From e9775581f56f4481aab6a33afe724266448534f6 Mon Sep 17 00:00:00 2001 From: Spxg Date: Sun, 25 May 2025 13:38:53 +0800 Subject: [PATCH] Fixed the automatic theme and orientation not working in some cases --- src/app/state.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/state.rs b/src/app/state.rs index 0dc9857..77a6148 100644 --- a/src/app/state.rs +++ b/src/app/state.rs @@ -194,7 +194,7 @@ impl Theme { } pub fn value(&self) -> Self { - if *self == Theme::System { + if self.is_system() { Self::match_media() .map(|query| { if query.matches() { @@ -250,7 +250,7 @@ impl Orientation { } pub fn value(&self) -> Self { - if *self == Orientation::Automatic { + if self.is_auto() { Self::match_media() .map(|query| { if query.matches() {