Initial work on v2 with activity#4900
Conversation
|
|
||
| OwnCloudClient create(User user) throws CreationException; | ||
|
|
||
| NextcloudClient createNextcloudClient(User user) throws CreationException; |
There was a problem hiding this comment.
CreationException is marked as @Deprecated.
I think it's rather kludgy to fail with exceptions in general. Many developers don't even know how to handle exceptions or care about handling them, using try-catch block to suppress them (sic!):
try {
veryImportantThng = makeStuff();
} catch(VeryNastyException ex) {
log(ex);
}
continue and probably crash later
Maybe we can return a client that fast-fails the operation? This way we can remove a lot of checks in the client code and make it safer:
- no edge cases
- no null handling
There was a problem hiding this comment.
Nice idea, let us discuss this in a new issue, even better in and https://github.com/nextcloud/android-library/
My intention of this PR was merely a c&p to get new v2 library up and running, so I would rather keep changes small.
There was a problem hiding this comment.
src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java
Outdated
Show resolved
Hide resolved
a8f4dc9 to
a14318f
Compare
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
3223f18 to
6eb4ac7
Compare
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/11948.apk |
Codacy327Lint
SpotBugs (new)
|
Codecov Report
@@ Coverage Diff @@
## master #4900 +/- ##
============================================
+ Coverage 17.75% 17.78% +0.02%
Complexity 3 3
============================================
Files 385 385
Lines 32682 32675 -7
Branches 4593 4593
============================================
+ Hits 5804 5812 +8
+ Misses 25949 25932 -17
- Partials 929 931 +2
|
10789e9 Merge pull request #4932 from nextcloud/useTestOrchestrator 50a73b4 on smaller displays we have to swipe up 9fce154 Use android test orchestrator cbf59eb Merge pull request #4983 from nextcloud/disableGoogleTracking e8eae2a disable google test tracking 257ac81 Merge pull request #4900 from nextcloud/v2withActivity a235718 fix tests 6eb4ac7 revert to master snapshot 8b61e74 remove unneeded accountManager e5cd5ff use nextcloudClient.execute(…) 066f4c2 Initial work on v2 with activity 45f1146 [tx-robot] updated from transifex d913950 daily dev 20191211

This is a very very first version of our new v2 library, which uses dav4jvm and okhttp.
This uses new GetActivitiesRemoteOperation with a NextcloudClient, as this is not critical.
Please have first look at it, @AndyScherzinger @ezaquarii
Same goes for nextcloud/android-library#361
We use default timeouts from OKHTTP:
Fixes #4987
Signed-off-by: tobiasKaminsky tobias@kaminsky.me