Minor changes to sync manager
This commit is contained in:
parent
dcd34b0d60
commit
46fcd8607f
2 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ class PhotoRepository {
|
|||
return true;
|
||||
}
|
||||
|
||||
void reloadPhotos() async {
|
||||
Future<void> reloadPhotos() async {
|
||||
_logger.info("Reloading...");
|
||||
await loadPhotos();
|
||||
Bus.instance.fire(LocalPhotosUpdatedEvent());
|
||||
|
|
|
@ -91,6 +91,7 @@ class PhotoSyncManager {
|
|||
first.createTimestamp.compareTo(second.createTimestamp));
|
||||
await _updateDatabase(
|
||||
photos, prefs, lastDBUpdateTimestamp, syncStartTimestamp);
|
||||
await PhotoRepository.instance.reloadPhotos();
|
||||
}
|
||||
await _syncWithRemote(prefs);
|
||||
}
|
||||
|
@ -294,7 +295,6 @@ class PhotoSyncManager {
|
|||
List<Photo> photos, SharedPreferences prefs, int timestamp) async {
|
||||
await _db.insertPhotos(photos);
|
||||
_logger.info("Inserted " + photos.length.toString() + " photos.");
|
||||
PhotoRepository.instance.reloadPhotos();
|
||||
return await prefs.setInt(_lastDBUpdateTimestampKey, timestamp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue