π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob] Add missing await
Neeraj Gupta5e401cc9a8a2
diff --git a/mobile/lib/main.dart b/mobile/lib/main.dartindex 5e26cba051..101d1ea0c5 100644--- a/mobile/lib/main.dart+++ b/mobile/lib/main.dart@@ -145,7 +145,7 @@ Future<void> _runBackgroundTask(String taskId, {String mode = 'normal'}) async {if (_isProcessRunning) {_logger.info("Background task triggered when process was already running");await _sync('bgTaskActiveProcess');- BackgroundFetch.finish(taskId);+ await BackgroundFetch.finish(taskId);} else {_runWithLogs(() async {@@ -162,7 +162,7 @@ Future<void> _runInBackground(String taskId) async {await Future.delayed(const Duration(seconds: 3));if (await _isRunningInForeground()) {_logger.info("FG task running, skipping BG taskID: $taskId");- BackgroundFetch.finish(taskId);+ await BackgroundFetch.finish(taskId);return;} else {_logger.info("FG task is not running");@@ -182,7 +182,7 @@ Future<void> _runInBackground(String taskId) async {}(),],);- BackgroundFetch.finish(taskId);+ await BackgroundFetch.finish(taskId);}// https://stackoverflow.com/a/73796478/546896@@ -428,7 +428,7 @@ Future<void> _killBGTask([String? taskId]) async {final prefs = await SharedPreferences.getInstance();await prefs.remove(kLastBGTaskHeartBeatTime);if (taskId != null) {- BackgroundFetch.finish(taskId);+ await BackgroundFetch.finish(taskId);}}