fix sync timeout
This commit is contained in:
@@ -27,7 +27,7 @@ class BangSyncRepository extends _$BangSyncRepository {
|
|||||||
await db.syncDao.lastSyncOfGroup(group).getSingleOrNull();
|
await db.syncDao.lastSyncOfGroup(group).getSingleOrNull();
|
||||||
|
|
||||||
if (lastSync != null &&
|
if (lastSync != null &&
|
||||||
lastSync.difference(DateTime.now()) < syncInterval) {
|
DateTime.now().difference(lastSync) < syncInterval) {
|
||||||
return Result.success(null);
|
return Result.success(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class HostSyncRepository extends _$HostSyncRepository {
|
|||||||
await db.syncDao.lastSyncOfSource(source).getSingleOrNull();
|
await db.syncDao.lastSyncOfSource(source).getSingleOrNull();
|
||||||
|
|
||||||
if (lastSync != null &&
|
if (lastSync != null &&
|
||||||
lastSync.difference(DateTime.now()) < syncInterval) {
|
DateTime.now().difference(lastSync) < syncInterval) {
|
||||||
return Result.success(null);
|
return Result.success(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user