refactor: adjust high contrast condition order in theme settings for consistency

This commit is contained in:
Dr-Blank 2024-10-05 09:03:13 -04:00
parent f96b954db3
commit 9a49dc5675
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
3 changed files with 5 additions and 5 deletions

View file

@ -362,8 +362,8 @@ class _BookCover extends HookConsumerWidget {
themeOfLibraryItemProvider( themeOfLibraryItemProvider(
itemId, itemId,
brightness: Theme.of(context).brightness, brightness: Theme.of(context).brightness,
highContrast: MediaQuery.of(context).highContrast || highContrast: themeSettings.highContrast ||
themeSettings.highContrast, MediaQuery.of(context).highContrast,
), ),
) )
.valueOrNull; .valueOrNull;

View file

@ -65,8 +65,8 @@ class AudiobookPlayer extends HookConsumerWidget {
themeOfLibraryItemProvider( themeOfLibraryItemProvider(
itemBeingPlayed.valueOrNull?.id, itemBeingPlayed.valueOrNull?.id,
brightness: Theme.of(context).brightness, brightness: Theme.of(context).brightness,
highContrast: MediaQuery.of(context).highContrast || highContrast: appSettings.themeSettings.highContrast ||
appSettings.themeSettings.highContrast, MediaQuery.of(context).highContrast,
), ),
); );

View file

@ -62,7 +62,7 @@ class MyApp extends ConsumerWidget {
ColorScheme darkColorScheme = brandDarkColorScheme; ColorScheme darkColorScheme = brandDarkColorScheme;
final shouldUseHighContrast = final shouldUseHighContrast =
MediaQuery.of(context).highContrast || themeSettings.highContrast; themeSettings.highContrast || MediaQuery.of(context).highContrast;
if (shouldUseHighContrast) { if (shouldUseHighContrast) {
lightColorScheme = lightColorScheme.copyWith( lightColorScheme = lightColorScheme.copyWith(