mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-12 09:27:01 +00:00
desktop address list state bugfix
This commit is contained in:
parent
ce67673a94
commit
32987b46a9
1 changed files with 6 additions and 3 deletions
|
@ -35,11 +35,13 @@ class _DesktopWalletAddressesViewState
|
||||||
static const _headerHeight = 70.0;
|
static const _headerHeight = 70.0;
|
||||||
static const _columnWidth0 = 489.0;
|
static const _columnWidth0 = 489.0;
|
||||||
|
|
||||||
late final Stream<void> addressCollectionWatcher;
|
Stream<void>? addressCollectionWatcher;
|
||||||
|
|
||||||
void _onAddressCollectionWatcherEvent() {
|
void _onAddressCollectionWatcherEvent() {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
setState(() {});
|
if (mounted) {
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,13 +52,14 @@ class _DesktopWalletAddressesViewState
|
||||||
.isar
|
.isar
|
||||||
.addresses
|
.addresses
|
||||||
.watchLazy(fireImmediately: true);
|
.watchLazy(fireImmediately: true);
|
||||||
addressCollectionWatcher.listen((_) => _onAddressCollectionWatcherEvent());
|
addressCollectionWatcher!.listen((_) => _onAddressCollectionWatcherEvent());
|
||||||
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
addressCollectionWatcher = null;
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue