Skip sync if already in progress

This commit is contained in:
Vishnu Mohandas 2021-02-26 15:20:52 +05:30
parent 813ded3360
commit 93b38bbe43

View file

@ -64,6 +64,9 @@ Future _init() async {
}
Future<void> _sync({bool isAppInBackground = false}) async {
if (SyncService.instance.isSyncInProgress()) {
return;
}
try {
await SyncService.instance.sync(isAppInBackground: isAppInBackground);
} catch (e, s) {