If a file is locally available on the client and the server changes the content in the meantime, the document storage provider provides the available content while an internal content update is started at the same time.
Steps to reproduce:
- Create a text file with the content "Content"
- Open this file via the SAF and then close it afterwards
- Change the contents of the file on the server to "New Contents".
- Open the file again via SAF. Notice the content of "Contents".
You will also see Nextcloud notifications while downloading as you open the file the second time.
The problem here is with the SynchronizeFileOperation, which detects the conflict and calls the FileDownloader intent internally (which itself shows the notifications we want to remove).
To solve this we have to remove this SynchronizeFileOperation here as well, detect the conflict ourselves and start the file download as if no file is down.
This solution requires copying some code from SynchronizeFileOperation to our storage provider.
If a file is locally available on the client and the server changes the content in the meantime, the document storage provider provides the available content while an internal content update is started at the same time.
Steps to reproduce:
You will also see Nextcloud notifications while downloading as you open the file the second time.
The problem here is with the SynchronizeFileOperation, which detects the conflict and calls the FileDownloader intent internally (which itself shows the notifications we want to remove).
To solve this we have to remove this SynchronizeFileOperation here as well, detect the conflict ourselves and start the file download as if no file is down.
This solution requires copying some code from SynchronizeFileOperation to our storage provider.