mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
Revert "Folder: Don't blindly trigger sync on first EtagJob result"
We need to do a sync even if the etag was empty because we do not know
if this is because the etag really changed or because it was new.
Also, some part of the code rely on this fact to schedule a sync.
The fact that there is two sync with 30 sec at the beginning is not
a big problem, because we also need to do the sync the put the directory
etag in the db.
This reverts commit 1c001ee138
.
This commit is contained in:
parent
1f9d02e7fa
commit
e7e91b6931
1 changed files with 1 additions and 5 deletions
|
@ -321,11 +321,7 @@ void Folder::etagRetreived(const QString& etag)
|
|||
// re-enable sync if it was disabled because network was down
|
||||
FolderMan::instance()->setSyncEnabled(true);
|
||||
|
||||
if (_lastEtag.isEmpty()) {
|
||||
_lastEtag = etag;
|
||||
// don't schedule a sync in this case, the _lastEtag is empty because it is the start
|
||||
// and a sync was scheduled through other means anyway.
|
||||
} else if (_lastEtag != etag) {
|
||||
if (_lastEtag != etag) {
|
||||
_lastEtag = etag;
|
||||
emit scheduleToSync(alias());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue