A cross platform Audiobookshelf client for Android and iOS
Dart
Make Unified Absorbing setting follow classic wording toggle
Barnabasf8283454bc17
diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dartindex cac859fe..bb1236f4 100644--- a/lib/screens/settings_screen.dart+++ b/lib/screens/settings_screen.dart@@ -809,21 +809,27 @@ class _SettingsScreenState extends State<SettingsScreen> {} : null,),const Divider(height: 1, indent: 16, endIndent: 16),- SwitchListTile(- title: Row(children: [- Flexible(child: Text(l.mergeLibraries)),- _infoIcon(l.mergeLibrariesInfoTitle, l.mergeLibrariesInfoContent),- ]),- subtitle: Text(- _mergeAbsorbingLibraries- ? l.mergeLibrariesOnSubtitle- : l.mergeLibrariesOffSubtitle,- style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant)),- value: _mergeAbsorbingLibraries,- onChanged: _loaded ? (v) {- setState(() => _mergeAbsorbingLibraries = v);- PlayerSettings.setMergeAbsorbingLibraries(v);- } : null,+ ValueListenableBuilder<bool>(+ valueListenable: classicWordingNotifier,+ builder: (context, _, __) {+ final w = Wording.of(context);+ return SwitchListTile(+ title: Row(children: [+ Flexible(child: Text(w.mergeLibraries)),+ _infoIcon(w.mergeLibrariesInfoTitle, w.mergeLibrariesInfoContent),+ ]),+ subtitle: Text(+ _mergeAbsorbingLibraries+ ? w.mergeLibrariesOnSubtitle+ : w.mergeLibrariesOffSubtitle,+ style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant)),+ value: _mergeAbsorbingLibraries,+ onChanged: _loaded ? (v) {+ setState(() => _mergeAbsorbingLibraries = v);+ PlayerSettings.setMergeAbsorbingLibraries(v);+ } : null,+ );+ },),const Divider(height: 1, indent: 16, endIndent: 16),Padding(diff --git a/lib/services/wording.dart b/lib/services/wording.dartindex 94240cde..1a3b1225 100644--- a/lib/services/wording.dart+++ b/lib/services/wording.dart@@ -45,6 +45,21 @@ class Wording {String get startScreenAbsorb => classic ? 'Now Playing' : _l.startScreenAbsorb;String get sectionAbsorbingCards => classic ? 'Player Cards' : _l.sectionAbsorbingCards;+ // ── Unified Absorbing page setting ──+ String get mergeLibraries =>+ classic ? 'Unified Now Playing page' : _l.mergeLibraries;+ String get mergeLibrariesInfoTitle =>+ classic ? 'Unified Now Playing Page' : _l.mergeLibrariesInfoTitle;+ String get mergeLibrariesInfoContent => classic+ ? 'When enabled, the Now Playing screen shows all your in-progress books and podcasts from every library in a single view. When disabled, only items from the library you currently have selected are shown.'+ : _l.mergeLibrariesInfoContent;+ String get mergeLibrariesOnSubtitle => classic+ ? 'Now Playing page shows items from all libraries'+ : _l.mergeLibrariesOnSubtitle;+ String get mergeLibrariesOffSubtitle => classic+ ? 'Now Playing page shows current library only'+ : _l.mergeLibrariesOffSubtitle;+// ── Empty / placeholder ──String get absorbingNothingAbsorbingYet =>classic ? 'Nothing playing yet' : _l.absorbingNothingAbsorbingYet;