mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 09:17:35 +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) {
|
||||
if (syncStatus is SyncingSyncStatus) {
|
||||
return syncStatus.blocksLeft == 1
|
||||
? S.current.block_remaining
|
||||
: S.current.Blocks_remaining('${syncStatus.blocksLeft}');
|
||||
if (syncStatus.blocksLeft == 1) {
|
||||
return S.current.block_remaining;
|
||||
}
|
||||
|
||||
String eta = syncStatus.getFormattedEta() ?? '';
|
||||
|
||||
if (eta.isEmpty) {
|
||||
return S.current.Blocks_remaining('${syncStatus.blocksLeft}');
|
||||
} else {
|
||||
return "${syncStatus.formattedProgress()} - $eta";
|
||||
}
|
||||
}
|
||||
|
||||
if (syncStatus is SyncedTipSyncStatus) {
|
||||
|
|
Loading…
Reference in a new issue