Bug fixes to sync status
This commit is contained in:
parent
ec613713bd
commit
d852546fd2
|
@ -62,6 +62,7 @@ class SyncStatusState extends State<SyncStatusWidget> {
|
|||
if (simpleMode) Padding(padding: EdgeInsets.fromLTRB(0, 8, 0, 0), child: Text(s.simpleMode)),
|
||||
Observer(builder: (context) {
|
||||
final time = eta.eta;
|
||||
final synced = syncStatus.isSynced();
|
||||
final syncedHeight = syncStatus.syncedHeight;
|
||||
final timestamp = syncStatus.timestamp?.timeAgo() ?? s.na;
|
||||
final latestHeight = syncStatus.latestHeight;
|
||||
|
@ -98,13 +99,13 @@ class SyncStatusState extends State<SyncStatusWidget> {
|
|||
final text = latestHeight == 0 ? Text(s.disconnected)
|
||||
: syncedHeight == null
|
||||
? Text(s.rescanNeeded)
|
||||
: syncStatus.isSynced()
|
||||
: synced
|
||||
? Text('$syncedHeight', style: theme.textTheme.caption)
|
||||
: GestureDetector(
|
||||
onTap: () => setState(() { display += 1; }),
|
||||
child: createSyncStatus());
|
||||
|
||||
return TextButton(onPressed: () => _onSync(context), child: text);
|
||||
return TextButton(onPressed: synced ? () => _onSync(context) : null, child: text);
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -629,6 +629,7 @@ abstract class _SyncStatus with Store {
|
|||
eta.reset();
|
||||
showSnackBar(S.of(context).rescanRequested(height));
|
||||
syncedHeight = height;
|
||||
timestamp = null;
|
||||
WarpApi.truncateData();
|
||||
WarpApi.rewindToHeight(height);
|
||||
await sync();
|
||||
|
|
|
@ -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.11+258
|
||||
version: 1.2.12+260
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0 <3.0.0"
|
||||
|
|
Loading…
Reference in New Issue