Skip sync if already in progress
This commit is contained in:
parent
813ded3360
commit
93b38bbe43
1 changed files with 3 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue