Sync when app resumes
This commit is contained in:
parent
aedabeed9f
commit
1ae000a4e6
|
@ -1,4 +1,5 @@
|
|||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:ui';
|
||||
import 'dart:math';
|
||||
|
||||
|
@ -385,7 +386,8 @@ class _AccountPageState extends State<AccountPage>
|
|||
}
|
||||
|
||||
_setupTimer() async {
|
||||
await _sync();
|
||||
await Future.delayed(Duration(seconds: 3));
|
||||
await _trySync();
|
||||
_timerSync = Timer.periodic(Duration(seconds: 15), (Timer t) {
|
||||
_trySync();
|
||||
});
|
||||
|
@ -395,8 +397,6 @@ class _AccountPageState extends State<AccountPage>
|
|||
return priceStore.zecPrice;
|
||||
}
|
||||
|
||||
_sync() async {}
|
||||
|
||||
_trySync() async {
|
||||
priceStore.fetchZecPrice();
|
||||
if (syncStatus.syncedHeight < 0) return;
|
||||
|
|
Loading…
Reference in New Issue