Sync data loss when using it with Auto-upload
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 92
Description
### ⚠️ Before posting ⚠️
- [x] This is a **bug**, not a question or an enhancement.
- [x] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [x] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
### Steps to reproduce
1. Setup sync and auto upload from the local folder on android, so that newly added files are also synced
2. Switch to mobile data. Create a new text file and add some contents.
3. Let the auto-upload upload the new file (make sure it allows unmetered uploads).
4. Sync won't run yet as it only does so on wifi
5. Once the file is uploaded, edit it locally by adding more content
6. Switch to Wifi and wait for sync to run in the background
7. The changes in step 5 are lost, and the file is restored to the version when it was auto uploaded
### Expected behaviour
Sync should either be true two-way (i.e. sync newly created files, moved files, and removed files), or if auto-upload is meant to be used instead (which only syncs new files and not removals/moves), then when sync runs it should upload the local changes (if they're newer) rather than removing them
### Actual behaviour
Any changes to a file in-between the time it is auto-uploaded and the time it is synced for the first time after that are lost.
### Android version
15
### Device brand and model
Pixel 7
### Stock or custom OS?
Stock
### Nextcloud android app version
3.31.1
### Nextcloud server version
30.0.6
### Using a reverse proxy?
I don't know
### Android logs
_No response_
### Server error logs
```bash
```
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.