Skip to content

A cross platform Audiobookshelf client for Android and iOS

Dart

Fix header consistency across all tabs

Nathan Poulsonbda68f04b2a1
diff --git a/lib/screens/absorbing_screen.dart b/lib/screens/absorbing_screen.dart
index cf7cea5e..9402c93e 100644
--- a/lib/screens/absorbing_screen.dart
+++ b/lib/screens/absorbing_screen.dart
@@ -471,7 +471,7 @@ class _AbsorbingScreenState extends State<AbsorbingScreen> {
// ── Header ──
AbsorbPageHeader(
title: 'Absorbing',
- padding: const EdgeInsets.fromLTRB(20, 4, 12, 0),
+ padding: const EdgeInsets.fromLTRB(20, 12, 20, 0),
trailing: GestureDetector(
onTap: () {
final newVal = !lib.isManualOffline;
diff --git a/lib/screens/library_screen.dart b/lib/screens/library_screen.dart
index 006576ac..0a1915b7 100644
--- a/lib/screens/library_screen.dart
+++ b/lib/screens/library_screen.dart
@@ -992,6 +992,28 @@ class LibraryScreenState extends State<LibraryScreen> with TickerProviderStateMi
children: [
AbsorbPageHeader(
title: 'Library',
+ trailing: GestureDetector(
+ onTap: () {
+ final newVal = !lib.isManualOffline;
+ lib.setManualOffline(newVal);
+ if (newVal) {
+ final dl = DownloadService();
+ final player = AudioPlayerService();
+ final itemId = player.currentItemId;
+ final epId = player.currentEpisodeId;
+ final dlKey = epId != null && itemId != null
+ ? '$itemId-$epId'
+ : itemId;
+ if (dlKey == null || !dl.isDownloaded(dlKey)) {
+ player.stop();
+ }
+ }
+ },
+ child: Icon(
+ lib.isOffline ? Icons.cloud_off_rounded : Icons.cloud_done_rounded,
+ size: 16, color: lib.isOffline ? Colors.orange : Colors.green,
+ ),
+ ),
actions: hasMultipleLibraries ? [
GestureDetector(
onTap: () => _showLibraryPicker(context, cs, tt, allLibraries, lib),