nextcloud / nextcloud/android

Enhance offline sync job

Open
#3,542 6 comments 0 reactions 0 assignees View on GitHub
enhancement feature: sync
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

With next version (3.5.0) we will check every 15 min and if on wifi, we update each downloaded file.
This is rather easy as we can detect it via changed eTag.

Locally changed files are currently "ignored", as they should either bei directly uploaded/changed in our app or via doc provider (and thus the changes are also instant).

However, we should think how to improve this, so that a downloaded file get updated, if it is changed locally, without notice of our app.
This should happen during the same offline sync job.

@nextcloud/desktop how do you detect these changes? Via inotify and handle them directly?
For each downloaded file I could compare the server info (which is unchanged as no etag changed) with the current state of the locally saved file:
- size -> might not change
- modificationTimestamp -> might have issues with timezones…
- (hashSum) -> we do not have this right now

Any other ideas?

Maybe modificationTimestamp is enough. If this differs, we try to synchronize the file. Worst case if we had a timezone change is, that all downloaded files tries to sync, but nothing really changes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.