mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-24 03:15:50 +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() {
|
void initState() {
|
||||||
final installedTheme = getInstalled();
|
final installedTheme = getInstalled();
|
||||||
_hasTheme = installedTheme != null;
|
_hasTheme = installedTheme != null;
|
||||||
|
if (_hasTheme) {
|
||||||
|
_needsUpdate = widget.data.version > (installedTheme?.version ?? 0);
|
||||||
|
}
|
||||||
|
|
||||||
_subscription = ref
|
_subscription = ref
|
||||||
.read(mainDBProvider)
|
.read(mainDBProvider)
|
||||||
|
@ -169,7 +172,8 @@ class _StackThemeCardState extends ConsumerState<StackThemeCard> {
|
||||||
setState(() {
|
setState(() {
|
||||||
_hasTheme = hasTheme;
|
_hasTheme = hasTheme;
|
||||||
if (hasTheme) {
|
if (hasTheme) {
|
||||||
_needsUpdate = widget.data.version > installedTheme.version!;
|
_needsUpdate =
|
||||||
|
widget.data.version > (installedTheme.version ?? 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue