From 9a49dc5675a28f7de2c192717b44e31231dc4554 Mon Sep 17 00:00:00 2001 From: Dr-Blank <64108942+Dr-Blank@users.noreply.github.com> Date: Sat, 5 Oct 2024 09:03:13 -0400 Subject: [PATCH] refactor: adjust high contrast condition order in theme settings for consistency --- lib/features/item_viewer/view/library_item_hero_section.dart | 4 ++-- lib/features/player/view/audiobook_player.dart | 4 ++-- lib/main.dart | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/features/item_viewer/view/library_item_hero_section.dart b/lib/features/item_viewer/view/library_item_hero_section.dart index c0efa6c..856c5a5 100644 --- a/lib/features/item_viewer/view/library_item_hero_section.dart +++ b/lib/features/item_viewer/view/library_item_hero_section.dart @@ -362,8 +362,8 @@ class _BookCover extends HookConsumerWidget { themeOfLibraryItemProvider( itemId, brightness: Theme.of(context).brightness, - highContrast: MediaQuery.of(context).highContrast || - themeSettings.highContrast, + highContrast: themeSettings.highContrast || + MediaQuery.of(context).highContrast, ), ) .valueOrNull; diff --git a/lib/features/player/view/audiobook_player.dart b/lib/features/player/view/audiobook_player.dart index cc6ecef..1940ba7 100644 --- a/lib/features/player/view/audiobook_player.dart +++ b/lib/features/player/view/audiobook_player.dart @@ -65,8 +65,8 @@ class AudiobookPlayer extends HookConsumerWidget { themeOfLibraryItemProvider( itemBeingPlayed.valueOrNull?.id, brightness: Theme.of(context).brightness, - highContrast: MediaQuery.of(context).highContrast || - appSettings.themeSettings.highContrast, + highContrast: appSettings.themeSettings.highContrast || + MediaQuery.of(context).highContrast, ), ); diff --git a/lib/main.dart b/lib/main.dart index 907bf62..d5d3304 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -62,7 +62,7 @@ class MyApp extends ConsumerWidget { ColorScheme darkColorScheme = brandDarkColorScheme; final shouldUseHighContrast = - MediaQuery.of(context).highContrast || themeSettings.highContrast; + themeSettings.highContrast || MediaQuery.of(context).highContrast; if (shouldUseHighContrast) { lightColorScheme = lightColorScheme.copyWith(