From 206a460cfa7a3044f9b1d376887a2a49e6dba3bd Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 23 May 2023 17:19:16 -0600 Subject: [PATCH] fix: update theme button --- .../appearance_settings/sub_widgets/stack_theme_card.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pages/settings_views/global_settings_view/appearance_settings/sub_widgets/stack_theme_card.dart b/lib/pages/settings_views/global_settings_view/appearance_settings/sub_widgets/stack_theme_card.dart index 0193621bd..2f6f03091 100644 --- a/lib/pages/settings_views/global_settings_view/appearance_settings/sub_widgets/stack_theme_card.dart +++ b/lib/pages/settings_views/global_settings_view/appearance_settings/sub_widgets/stack_theme_card.dart @@ -155,6 +155,9 @@ class _StackThemeCardState extends ConsumerState { 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 { setState(() { _hasTheme = hasTheme; if (hasTheme) { - _needsUpdate = widget.data.version > installedTheme.version!; + _needsUpdate = + widget.data.version > (installedTheme.version ?? 0); } }); });