fix: increment a counter when there is a system theme mode change, or the theme is set to system

this forces a new subscription for the system theme, which seemed to fall behind previously unless the mode was changed back and forth
This commit is contained in:
Ashley Wulber 2023-10-26 14:21:07 -04:00 committed by Ashley Wulber
parent 047a8376ee
commit 6b517ddb0e
2 changed files with 10 additions and 4 deletions

View file

@ -49,6 +49,7 @@ pub struct Core {
/// Scaling factor used by the application
scale_factor: f32,
pub(super) theme_sub_counter: u64,
/// Last known system theme
pub(super) system_theme: Theme,
@ -75,6 +76,7 @@ impl Default for Core {
},
scale_factor: 1.0,
title: String::new(),
theme_sub_counter: 0,
system_theme: crate::theme::active(),
system_theme_mode: ThemeMode::config()
.map(|c| {