Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

await social sync in background

laurenspriemaa6a3bed0939
diff --git a/mobile/apps/photos/lib/services/sync/remote_sync_service.dart b/mobile/apps/photos/lib/services/sync/remote_sync_service.dart
index 0c3e1dbfe1..a786d3ba3a 100644
--- a/mobile/apps/photos/lib/services/sync/remote_sync_service.dart
+++ b/mobile/apps/photos/lib/services/sync/remote_sync_service.dart
@@ -140,7 +140,11 @@ class RemoteSyncService {
await _collectionsService.movePendingRemovalActionsToUncategorized();
// Sync social data immediately after diff sync, before uploads
- _socialSync().ignore();
+ if (AppLifecycleService.instance.isForeground) {
+ _socialSync().ignore();
+ } else {
+ await _socialSync();
+ }
if (!hasSyncedBefore) {
await _prefs.setBool(_isFirstRemoteSyncDone, true);