This commit is contained in:
rang 2025-12-01 15:34:12 +08:00
parent 1ca8e4889a
commit aad510ea45
31 changed files with 777 additions and 239 deletions

View file

@ -9,6 +9,7 @@ import 'package:vaani/api/server_provider.dart';
import 'package:vaani/db/storage.dart';
import 'package:vaani/features/logging/core/logger.dart';
import 'package:vaani/features/player/providers/audiobook_player.dart';
import 'package:vaani/features/player/providers/currently_playing_provider.dart';
import 'package:vaani/features/settings/api_settings_provider.dart';
import 'package:vaani/features/settings/app_settings_provider.dart';
import 'package:vaani/framework.dart';
@ -121,18 +122,18 @@ class AbsApp extends ConsumerWidget {
if (themeSettings.useCurrentPlayerThemeThroughoutApp) {
try {
final session = ref.watch(sessionProvider);
if (session != null) {
final currentBook = ref.watch(currentBookProvider);
if (currentBook != null) {
final themeLight = ref.watch(
themeOfLibraryItemProvider(
session.libraryItemId,
currentBook.libraryItemId,
highContrast: shouldUseHighContrast,
brightness: Brightness.light,
),
);
final themeDark = ref.watch(
themeOfLibraryItemProvider(
session.libraryItemId,
currentBook.libraryItemId,
highContrast: shouldUseHighContrast,
brightness: Brightness.dark,
),