mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 17:27:37 +00:00
other necessary changes
This commit is contained in:
parent
8faa123eb3
commit
26267ad200
1 changed files with 11 additions and 3 deletions
|
@ -3,9 +3,17 @@ import 'package:cw_core/sync_status.dart';
|
||||||
|
|
||||||
String syncStatusTitle(SyncStatus syncStatus) {
|
String syncStatusTitle(SyncStatus syncStatus) {
|
||||||
if (syncStatus is SyncingSyncStatus) {
|
if (syncStatus is SyncingSyncStatus) {
|
||||||
return syncStatus.blocksLeft == 1
|
if (syncStatus.blocksLeft == 1) {
|
||||||
? S.current.block_remaining
|
return S.current.block_remaining;
|
||||||
: S.current.Blocks_remaining('${syncStatus.blocksLeft}');
|
}
|
||||||
|
|
||||||
|
String eta = syncStatus.getFormattedEta() ?? '';
|
||||||
|
|
||||||
|
if (eta.isEmpty) {
|
||||||
|
return S.current.Blocks_remaining('${syncStatus.blocksLeft}');
|
||||||
|
} else {
|
||||||
|
return "${syncStatus.formattedProgress()} - $eta";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (syncStatus is SyncedTipSyncStatus) {
|
if (syncStatus is SyncedTipSyncStatus) {
|
||||||
|
|
Loading…
Reference in a new issue