mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
bugfix-unspent-coins-back-button (#2335)
* Update unspent_coins_list_page.dart * minor fix * close the page after the update is done
This commit is contained in:
@@ -41,14 +41,18 @@ class UnspentCoinsListPage extends BasePage {
|
||||
final UnspentCoinsListViewModel unspentCoinsListViewModel;
|
||||
|
||||
Future<void> handleOnPopInvoked(BuildContext context) async {
|
||||
final navigator = Navigator.of(context);
|
||||
final hasChanged = unspentCoinsListViewModel.hasAdjustableFieldChanged;
|
||||
if (unspentCoinsListViewModel.items.isEmpty || !hasChanged) {
|
||||
Navigator.of(context).pop();
|
||||
} else {
|
||||
unspentCoinsListViewModel.setIsDisposing(true);
|
||||
await unspentCoinsListViewModel.dispose();
|
||||
Navigator.of(context).pop();
|
||||
if (navigator.canPop()) navigator.pop();
|
||||
return;
|
||||
}
|
||||
|
||||
unspentCoinsListViewModel.setIsDisposing(true);
|
||||
await unspentCoinsListViewModel.dispose();
|
||||
|
||||
if (navigator.canPop()) navigator.pop();
|
||||
if (navigator.canPop()) navigator.pop();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user