diff --git a/lib/accounts.dart b/lib/accounts.dart index 672432d..a772868 100644 --- a/lib/accounts.dart +++ b/lib/accounts.dart @@ -157,7 +157,6 @@ abstract class _ActiveAccount with Store { @action Future setActiveAccount(int _coin, int _id) async { - print("setActiveAccount $_coin $_id"); coin = _coin; id = _id; accounts.saveActive(coin, id); @@ -228,6 +227,7 @@ abstract class _ActiveAccount with Store { @computed List get sortedNotes { + final _1 = syncStatus.syncedHeight; var notes2 = [...notes]; switch (noteSortConfig.field) { case "time": @@ -240,6 +240,7 @@ abstract class _ActiveAccount with Store { @computed List get sortedTxs { + final _1 = syncStatus.syncedHeight; var txs2 = [...txs]; switch (txSortConfig.field) { case "time": diff --git a/lib/history.dart b/lib/history.dart index bf83c75..9050a72 100644 --- a/lib/history.dart +++ b/lib/history.dart @@ -25,6 +25,7 @@ class HistoryState extends State padding: EdgeInsets.all(4), scrollDirection: Axis.vertical, child: Observer(builder: (context) { + final _1 = active.sortedTxs; return PaginatedDataTable( header: Text(S.of(context).tapTransactionForDetails, style: Theme.of(context).textTheme.bodyText2), actions: [ diff --git a/lib/home.dart b/lib/home.dart index a8fd0eb..8b9aa97 100644 --- a/lib/home.dart +++ b/lib/home.dart @@ -66,7 +66,6 @@ class HomeState extends State { @override Widget build(BuildContext context) => Observer(builder: (context) { final _simpleMode = settings.simpleMode; - final _dataEpoch = active.dataEpoch; final key = UniqueKey(); return HomeInnerPage(key: key); }); diff --git a/lib/note.dart b/lib/note.dart index 0fe022e..03b30fd 100644 --- a/lib/note.dart +++ b/lib/note.dart @@ -25,7 +25,7 @@ class _NoteState extends State with AutomaticKeepAliveClientMixin { padding: EdgeInsets.all(8), scrollDirection: Axis.vertical, child: Observer(builder: (context) { - active.sortedNotes; + final _1 = active.sortedNotes; return PaginatedDataTable( columns: [ DataColumn( diff --git a/lib/store.dart b/lib/store.dart index fd15e42..8496249 100644 --- a/lib/store.dart +++ b/lib/store.dart @@ -460,7 +460,8 @@ abstract class _SyncStatus with Store { @action setSyncHeight(int? height) { - syncedHeight = height; + if (height == null || syncedHeight != height) + syncedHeight = height; } @action @@ -480,8 +481,7 @@ abstract class _SyncStatus with Store { latestHeight = await WarpApi.getLatestHeight(active.coin); final _syncedHeight = await getDbSyncedHeight(); // if syncedHeight = 0, we just started sync therefore don't set it back to null - if (syncedHeight != 0 || _syncedHeight != null) setSyncHeight( - _syncedHeight); + if (syncedHeight != 0 || _syncedHeight != null) setSyncHeight(_syncedHeight); return latestHeight > 0 && syncedHeight == latestHeight; } diff --git a/pubspec.yaml b/pubspec.yaml index f44d3d2..fc8fab4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.2.1+207 +version: 1.2.1+208 environment: sdk: ">=2.12.0 <3.0.0"