mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-23 19:05:51 +00:00
fix: update theme button
This commit is contained in:
parent
492ad6b353
commit
206a460cfa
1 changed files with 5 additions and 1 deletions
|
@ -155,6 +155,9 @@ class _StackThemeCardState extends ConsumerState<StackThemeCard> {
|
|||
void initState() {
|
||||
final installedTheme = getInstalled();
|
||||
_hasTheme = installedTheme != null;
|
||||
if (_hasTheme) {
|
||||
_needsUpdate = widget.data.version > (installedTheme?.version ?? 0);
|
||||
}
|
||||
|
||||
_subscription = ref
|
||||
.read(mainDBProvider)
|
||||
|
@ -169,7 +172,8 @@ class _StackThemeCardState extends ConsumerState<StackThemeCard> {
|
|||
setState(() {
|
||||
_hasTheme = hasTheme;
|
||||
if (hasTheme) {
|
||||
_needsUpdate = widget.data.version > installedTheme.version!;
|
||||
_needsUpdate =
|
||||
widget.data.version > (installedTheme.version ?? 0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue