-
-
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
deleting files on tab 'Auf dem Gerät' deletes also files on nextcloud instance #2718
Comments
I can't remember about that 'dialogue', but will try again to see if I 'accidentally' clicked "yes"... |
This is likely also a translation issue since the original/English term we use here is available offline. |
It seems to be confusing for all of us ;-) In drawer it is named "on device", which is showing all files that are downloaded (and also the parent folders): "available offline" is for files, which then get synced if any side (local or remote) is changing.
Do we want then switch the dialog? @jancborchardt what do you think? Or is this bad to have the "same" action (delete) behaving different? |
Delete should behave the same from wherever you do it. :) (Which currently means showing this dialog. But yes – ideally it just deletes it off the server directly with a toast to undo. Because currently this extra modal is only useful for the case of only removing the cached version on the device, which is kind-of-edge-casey.) |
well, this is what this issue is all about. |
It seems like it might stem a from a confusion about the word "On device". Because it’s just a filter on the list of files, the same actions should apply. Maybe renaming it to "Available offline" might be good? Of course there’s also the explicit "available offline" functionality – but files from there show up there too, and de facto all of the files "On device" are "Available offline" in the sense of the word. The point being that deleting a file which is labeled "on the device" it makes sense to assume that it would only be deleted off the device. But for a file which also happens to be "available offline", deleting it will actually delete it. |
Having two completely different things called "available offline" will confuse all. "available offline" (on files) -> "keep in sync" / permanently synced / 2way sync (we had a similar discussion ages ago and there "available offline" was chosen, but what was the previous name? I do not remember…) |
Ah, found, history is (from old to new):
|
android/src/main/res/values/strings.xml Lines 277 to 280 in 9fbcc97
This is a real mess. I vote for "keep in sync". |
Not sure if discussing the used term is the right first step. I'd rather would like to challenge the feature set here:
In my opinion having these 3 doesn't make much sense (from a user perspective) because:
For a first rewrite I vote for:
...because else Favorites are a subset files kept in sync and in case a user favs a folder they might not want to get the whole thing mirrored to their device. |
Available offline is a periodic scan that refreshes all "available offline" files.
If we want that every downloaded file is also up to date, then we do not need "keep in sync" at all?
Should remain favorite as it is the same as on server. |
We would still need it for folders (which we do not have at all atm)
completely agree with your point here
Which it kind of isn't at the moment. Marking a file as Favorite in the details screen will download the file and mark it available offline! |
We then would have it only for folders:
Sync would then be
When entering a "keep in sync" folder with wifi: When entering a "keep in sync" folder without wifi:
When entering a regular folder (independent from wifi):
|
@tobiasKaminsky looks good to me, except for the last scenario
When entering a regular folder (independent from wifi):
|
👍 updated the 3 scenarios a bit |
From the user perspective, I agree with @AndyScherzinger’s comment #2718 (comment), but would go even simpler:
That’s it. |
I strongly suggest to not do this because keep-in-sync != favorite, because:
TD;DR I think this needs further discussion and is a quite complex feature also looking a #2783 where users might expect no physical copy at all when opening files from the server but downloading only on demand. |
For favorited files I would be fine with auto downloading it (on wifi). Another point for this: So: In general:
Supporting both is nearly impossible to manage, so we have to choose and I would like to go for 2. |
Ok, good points @AndyScherzinger. So then favorites are not downloaded by default – except if you do download them. But then I still think that keep-in-sync is not necessary because once you use "Download", downloaded files should absolutely all be kept in sync, also for complete folders. Which in the end is what @AndyScherzinger proposed at #2718 (comment), right? :) So then I agree, good direction! 🚀 |
@jancborchardt Yes that is what I proposed 👍 |
So, I implemented a sync job that syncs all downloaded files and removes them if they are no longer on the server. I therefore removed "keep in sync". For folders we currently have a manual sync, which we (still) want to extend to have a real 2way sync later. |
Every 15 minutes sounds fine to me and we could also improve upon this once it is on master to have some more logic for calculating the intervals based on the change frequency, if files change once a week would don't need to check every 15 minutes I guess :) |
This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you! |
Actual behaviour
Having an 'auto-upload' folder defined which I have choosen to 'syncronize'. The result was, that the folder appeared on
Auf dem Gerät
on my smartphone. I didn't wanted to have those files twice or double .../storage/emulated/0/ProgramData
(which is uploaded to /OnePlus2/ProgramData)/storage/emulated/0/nextcloud/OnePlus2/ProgramData
so I decided to delete the local sync
OnePlus2
which is shown under tabAuf dem Gerät
... but also/OnePlus2
folder on my nextcloud instance was deletedExpected behaviour
From my point of view only the local sync of files should be deleted when deleting files on the tab
Auf dem Gerät
on your smartphone and NOT the source on the nextcloud instance ...Steps to reproduce
... before you try enable the usage of Trash on your nextcloud that you can restore deleted files.
Environment data
Android version: 8.1.0
Device model: OnePlus 2
Stock or customized system: RR-O-v6.0.0-20180530-oneplus-Official
Nextcloud app version: 3.1.0
Nextcloud server version: 12.0.7
Logs
Web server error log
Nextcloud log (data/nextcloud.log)
The text was updated successfully, but these errors were encountered: