other necessary changes

This commit is contained in:
fossephate 2024-09-24 08:38:22 -07:00
parent 8faa123eb3
commit 26267ad200

View file

@ -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) {