-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
activity: finish the activity when pressing back from the root folder. #3815
base: master
Are you sure you want to change the base?
Conversation
When browsing for files to upload a storage location selection prompt is shown when hitting the back toolbar button when in the root directory. It probably makes more sense to finish the activity. Fixes #3811 Signed-off-by: ardevd <[email protected]>
Lint
FindBugs (new)
FindBugs (master)
|
Codecov Report
@@ Coverage Diff @@
## master #3815 +/- ##
===========================================
+ Coverage 6.33% 6.34% +<.01%
Complexity 1 1
===========================================
Files 323 323
Lines 31254 31254
Branches 4473 4473
===========================================
+ Hits 1981 1982 +1
+ Misses 28979 28978 -1
Partials 294 294
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #3815 +/- ##
===========================================
+ Coverage 6.33% 6.34% +<.01%
Complexity 1 1
===========================================
Files 323 323
Lines 31254 31254
Branches 4473 4473
===========================================
+ Hits 1981 1982 +1
+ Misses 28979 28978 -1
Partials 294 294
|
Not entirely sure how we can determine whether the folder is not accessible and not the root (of /sdcard) considering how that partition is mounted in a plethora of different ways across different devices. |
Right, this is indeed a bit tricky… What about this:
So if you chose external sdcard, which might be in /emulated/1908-1233/ and you navigate up, you might see /emulated (read-only) with no content, but still can navigate up to "/". |
@AndyScherzinger we discussed this a while ago on irc…do you remember our conclusion? |
Unfortunately no :( But couldn't we just show the chooser except in cases where we can't navigate one-up -> then we close the screen. |
How do you differentiate between navigating one-up and navigating down? EDIT: obviously, when pressing the back button you will be navigating up. So the current PR kinda works I guess? |
Not sure because you can navigate one up (to the root) while you can't read it. So this PR will close the screen when being in the root folder instad of showing the chooser. If you are in the root, canceled the chooser and then try to move one up (which is impossible of course) then I'd say we close the screen. As for navigating down, well that is a different scenario in my opinion. If you navigate down (into a non-readable folder) then we should rather either a) not navigate down but show a Snackbar that the folder is non-readable) or b) navigate into that folder and show an empty list with the information that the folder is non-readable (navigatioin back up is then still possible). What do you think @ardevd @tobiasKaminsky maybe also looping in @jancborchardt and @nextcloud/designers and please beware that the original solution proposed by @jancborchardt (displaying the choosers content instead of the file listing when hitting the root folder) is still valid but I never found the time to implement that since that would take more time than I had/have so we went for the actual implementation to at least solve the general problem and optimize for a nicer solution later. |
I am fine with either way. |
I also vote for separating that part |
@ardevd could you post a screenshot for context? Maybe it’s better then to indicate somewhere in the header of that dialog (like top right) which storage you are in (like icons for either "Internal storage" with a phone icon or "SD card" with SD card icon). Tapping it would open a picker for the storage, rather than having it as a parent view. That way you can also switch storages when somewhere lower down the hierarchy. Does that make sense?
@AndyScherzinger agree with that one, better than the toast. But yes as has already been said it’s a separate issue. :) |
When browsing for files to upload a storage location selection prompt is shown when hitting the back toolbar button when in the root directory. It probably makes more sense to finish the activity.
Fixes #3811