fix: update theme button

This commit is contained in:
julian 2023-05-23 17:19:16 -06:00
parent 492ad6b353
commit 206a460cfa

View file

@ -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);
}
});
});