Fixed the automatic theme and orientation not working in some cases

This commit is contained in:
Spxg
2025-05-25 13:38:53 +08:00
parent c344645244
commit e9775581f5

View File

@@ -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() {