Prevent unnecessary reloads
This commit is contained in:
parent
5d65eb2e05
commit
ce1d492262
1 changed files with 4 additions and 3 deletions
|
@ -107,9 +107,10 @@ class SyncService {
|
|||
}
|
||||
files.sort(
|
||||
(first, second) => first.creationTime.compareTo(second.creationTime));
|
||||
|
||||
await _insertFilesToDB(files, syncStartTime);
|
||||
await FileRepository.instance.reloadFiles();
|
||||
if (files.isNotEmpty) {
|
||||
await _insertFilesToDB(files, syncStartTime);
|
||||
await FileRepository.instance.reloadFiles();
|
||||
}
|
||||
await syncWithRemote();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue