Skip to content

A cross platform Audiobookshelf client for Android and iOS

Dart

Show books with no chapters the same way as podcasts with no chapters

Barnabasaa1043e323d6
diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb
index 4f5e063b..aa23152f 100644
--- a/lib/l10n/app_en.arb
+++ b/lib/l10n/app_en.arb
@@ -531,6 +531,7 @@
"queueModeManual": "Manual",
"queueModeAuto": "Auto",
"queueModePlaylist": "Playlist",
+ "queueModeCollection": "Collection",
"queueModeInfoPlaylist": "Playlist Queue",
"queueModeInfoPlaylistDesc": "Plays items in order from a chosen playlist, skipping anything already finished. Stops at the end of the list.",
"queuePlaylistPickerTitle": "Choose a playlist",
@@ -557,6 +558,7 @@
"showUpNextLabel": "Show Up next on the absorbing page",
"openSeries": "Open series",
"openPlaylist": "Open playlist",
+ "openCollection": "Open collection",
"playlistPlayAction": "Play playlist",
"playlistAllFinished": "All finished",
"queueModeBooks": "Books",
@@ -1203,6 +1205,8 @@
}
},
"chapters": "Chapters",
+ "noChaptersBook": "This book has no chapters",
+ "noChaptersPodcast": "This podcast has no chapters",
"failedToLoad": "Failed to load",
"startedDate": "Started {date}",
"@startedDate": {
diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart
index a30cba28..00cbd9e3 100644
--- a/lib/l10n/app_localizations.dart
+++ b/lib/l10n/app_localizations.dart
@@ -2152,6 +2152,12 @@ abstract class AppLocalizations {
/// **'Playlist'**
String get queueModePlaylist;
+ /// No description provided for @queueModeCollection.
+ ///
+ /// In en, this message translates to:
+ /// **'Collection'**
+ String get queueModeCollection;
+
/// No description provided for @queueModeInfoPlaylist.
///
/// In en, this message translates to:
@@ -2224,6 +2230,12 @@ abstract class AppLocalizations {
/// **'Open playlist'**
String get openPlaylist;
+ /// No description provided for @openCollection.
+ ///
+ /// In en, this message translates to:
+ /// **'Open collection'**
+ String get openCollection;
+
/// No description provided for @playlistPlayAction.
///
/// In en, this message translates to:
@@ -4426,6 +4438,18 @@ abstract class AppLocalizations {
/// **'Chapters'**
String get chapters;
+ /// No description provided for @noChaptersBook.
+ ///
+ /// In en, this message translates to:
+ /// **'This book has no chapters'**
+ String get noChaptersBook;
+
+ /// No description provided for @noChaptersPodcast.
+ ///
+ /// In en, this message translates to:
+ /// **'This podcast has no chapters'**
+ String get noChaptersPodcast;
+
/// No description provided for @failedToLoad.
///
/// In en, this message translates to:
diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart
index cf81320c..6668f194 100644
--- a/lib/l10n/app_localizations_de.dart
+++ b/lib/l10n/app_localizations_de.dart
@@ -1131,6 +1131,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get queueModePlaylist => 'Wiedergabeliste';
+ @override
+ String get queueModeCollection => 'Collection';
+
@override
String get queueModeInfoPlaylist => 'Playlist Queue';
@@ -1173,6 +1176,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get openPlaylist => 'Open playlist';
+ @override
+ String get openCollection => 'Open collection';
+
@override
String get playlistPlayAction => 'Play playlist';
@@ -2429,6 +2435,12 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get chapters => 'Kapitel';
+ @override
+ String get noChaptersBook => 'This book has no chapters';
+
+ @override
+ String get noChaptersPodcast => 'This podcast has no chapters';
+
@override
String get failedToLoad => 'Laden fehlgeschlagen';
diff --git a/lib/l10n/app_localizations_el.dart b/lib/l10n/app_localizations_el.dart
index 77d23a07..e81f2d98 100644
--- a/lib/l10n/app_localizations_el.dart
+++ b/lib/l10n/app_localizations_el.dart
@@ -1123,6 +1123,9 @@ class AppLocalizationsEl extends AppLocalizations {
@override
String get queueModePlaylist => 'Playlist';
+ @override
+ String get queueModeCollection => 'Collection';
+
@override
String get queueModeInfoPlaylist => 'Playlist Queue';
@@ -1165,6 +1168,9 @@ class AppLocalizationsEl extends AppLocalizations {
@override
String get openPlaylist => 'Open playlist';
+ @override
+ String get openCollection => 'Open collection';
+
@override
String get playlistPlayAction => 'Play playlist';
@@ -2407,6 +2413,12 @@ class AppLocalizationsEl extends AppLocalizations {
@override
String get chapters => 'Chapters';
+ @override
+ String get noChaptersBook => 'This book has no chapters';
+
+ @override
+ String get noChaptersPodcast => 'This podcast has no chapters';
+
@override
String get failedToLoad => 'Failed to load';
diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart
index f54f77b1..b2876f0d 100644
--- a/lib/l10n/app_localizations_en.dart
+++ b/lib/l10n/app_localizations_en.dart
@@ -1123,6 +1123,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get queueModePlaylist => 'Playlist';
+ @override
+ String get queueModeCollection => 'Collection';
+
@override
String get queueModeInfoPlaylist => 'Playlist Queue';
@@ -1165,6 +1168,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get openPlaylist => 'Open playlist';
+ @override
+ String get openCollection => 'Open collection';
+
@override
String get playlistPlayAction => 'Play playlist';
@@ -2407,6 +2413,12 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get chapters => 'Chapters';
+ @override
+ String get noChaptersBook => 'This book has no chapters';
+
+ @override
+ String get noChaptersPodcast => 'This podcast has no chapters';
+
@override
String get failedToLoad => 'Failed to load';
diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart
index 6ad4c110..b029acf7 100644
--- a/lib/l10n/app_localizations_es.dart
+++ b/lib/l10n/app_localizations_es.dart
@@ -1123,6 +1123,9 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get queueModePlaylist => 'Playlist';
+ @override
+ String get queueModeCollection => 'Collection';
+
@override
String get queueModeInfoPlaylist => 'Playlist Queue';
@@ -1165,6 +1168,9 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get openPlaylist => 'Open playlist';
+ @override
+ String get openCollection => 'Open collection';
+
@override
String get playlistPlayAction => 'Play playlist';
@@ -2407,6 +2413,12 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get chapters => 'Chapters';
+ @override
+ String get noChaptersBook => 'This book has no chapters';
+
+ @override
+ String get noChaptersPodcast => 'This podcast has no chapters';
+
@override
String get failedToLoad => 'Failed to load';
diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart
index b1571dc6..77d06c45 100644
--- a/lib/l10n/app_localizations_fr.dart
+++ b/lib/l10n/app_localizations_fr.dart
@@ -1125,6 +1125,9 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get queueModePlaylist => 'Playlist';
+ @override
+ String get queueModeCollection => 'Collection';
+
@override
String get queueModeInfoPlaylist => 'Playlist Queue';
@@ -1167,6 +1170,9 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get openPlaylist => 'Open playlist';
+ @override
+ String get openCollection => 'Open collection';
+
@override
String get playlistPlayAction => 'Play playlist';
@@ -2409,6 +2415,12 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get chapters => 'Chapters';
+ @override
+ String get noChaptersBook => 'This book has no chapters';
+
+ @override
+ String get noChaptersPodcast => 'This podcast has no chapters';
+
@override
String get failedToLoad => 'Failed to load';
diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart
index c7647aa4..d1687b6a 100644
--- a/lib/l10n/app_localizations_it.dart
+++ b/lib/l10n/app_localizations_it.dart
@@ -1123,6 +1123,9 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get queueModePlaylist => 'Playlist';
+ @override
+ String get queueModeCollection => 'Collection';
+
@override
String get queueModeInfoPlaylist => 'Playlist Queue';
@@ -1165,6 +1168,9 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get openPlaylist => 'Open playlist';
+ @override
+ String get openCollection => 'Open collection';
+
@override
String get playlistPlayAction => 'Play playlist';
@@ -2407,6 +2413,12 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get chapters => 'Chapters';
+ @override
+ String get noChaptersBook => 'This book has no chapters';
+
+ @override
+ String get noChaptersPodcast => 'This podcast has no chapters';
+
@override
String get failedToLoad => 'Failed to load';
diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart
index a57d7020..7ce594c9 100644
--- a/lib/l10n/app_localizations_ja.dart
+++ b/lib/l10n/app_localizations_ja.dart
@@ -1123,6 +1123,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get queueModePlaylist => 'Playlist';
+ @override
+ String get queueModeCollection => 'Collection';
+
@override
String get queueModeInfoPlaylist => 'Playlist Queue';
@@ -1165,6 +1168,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get openPlaylist => 'Open playlist';
+ @override
+ String get openCollection => 'Open collection';
+
@override
String get playlistPlayAction => 'Play playlist';
@@ -2407,6 +2413,12 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get chapters => 'Chapters';
+ @override
+ String get noChaptersBook => 'This book has no chapters';
+
+ @override
+ String get noChaptersPodcast => 'This podcast has no chapters';
+
@override
String get failedToLoad => 'Failed to load';
diff --git a/lib/l10n/app_localizations_no.dart b/lib/l10n/app_localizations_no.dart
index cc5aafad..70263005 100644
--- a/lib/l10n/app_localizations_no.dart
+++ b/lib/l10n/app_localizations_no.dart
@@ -1123,6 +1123,9 @@ class AppLocalizationsNo extends AppLocalizations {
@override
String get queueModePlaylist => 'Playlist';
+ @override
+ String get queueModeCollection => 'Collection';
+
@override
String get queueModeInfoPlaylist => 'Playlist Queue';
@@ -1165,6 +1168,9 @@ class AppLocalizationsNo extends AppLocalizations {
@override
String get openPlaylist => 'Open playlist';
+ @override
+ String get openCollection => 'Open collection';
+
@override
String get playlistPlayAction => 'Play playlist';
@@ -2407,6 +2413,12 @@ class AppLocalizationsNo extends AppLocalizations {
@override
String get chapters => 'Chapters';
+ @override
+ String get noChaptersBook => 'This book has no chapters';
+
+ @override
+ String get noChaptersPodcast => 'This podcast has no chapters';
+
@override
String get failedToLoad => 'Failed to load';
diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart
index 3c36d6ab..bc964e58 100644
--- a/lib/l10n/app_localizations_pt.dart
+++ b/lib/l10n/app_localizations_pt.dart
@@ -1123,6 +1123,9 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get queueModePlaylist => 'Playlist';
+ @override
+ String get queueModeCollection => 'Collection';
+
@override
String get queueModeInfoPlaylist => 'Playlist Queue';
@@ -1165,6 +1168,9 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get openPlaylist => 'Open playlist';
+ @override
+ String get openCollection => 'Open collection';
+
@override
String get playlistPlayAction => 'Play playlist';
@@ -2407,6 +2413,12 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get chapters => 'Chapters';
+ @override
+ String get noChaptersBook => 'This book has no chapters';
+
+ @override
+ String get noChaptersPodcast => 'This podcast has no chapters';
+
@override
String get failedToLoad => 'Failed to load';
diff --git a/lib/l10n/app_localizations_ro.dart b/lib/l10n/app_localizations_ro.dart
index 0e421d85..647f8603 100644
--- a/lib/l10n/app_localizations_ro.dart
+++ b/lib/l10n/app_localizations_ro.dart
@@ -1123,6 +1123,9 @@ class AppLocalizationsRo extends AppLocalizations {
@override
String get queueModePlaylist => 'Playlist';
+ @override
+ String get queueModeCollection => 'Collection';
+
@override
String get queueModeInfoPlaylist => 'Playlist Queue';
@@ -1165,6 +1168,9 @@ class AppLocalizationsRo extends AppLocalizations {
@override
String get openPlaylist => 'Open playlist';
+ @override
+ String get openCollection => 'Open collection';
+
@override
String get playlistPlayAction => 'Play playlist';
@@ -2407,6 +2413,12 @@ class AppLocalizationsRo extends AppLocalizations {
@override
String get chapters => 'Chapters';
+ @override
+ String get noChaptersBook => 'This book has no chapters';
+
+ @override
+ String get noChaptersPodcast => 'This podcast has no chapters';
+
@override
String get failedToLoad => 'Failed to load';
diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart
index 94b5af02..13f8a2f9 100644
--- a/lib/l10n/app_localizations_ru.dart
+++ b/lib/l10n/app_localizations_ru.dart
@@ -1126,6 +1126,9 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get queueModePlaylist => 'Playlist';
+ @override
+ String get queueModeCollection => 'Collection';
+
@override
String get queueModeInfoPlaylist => 'Playlist Queue';
@@ -1168,6 +1171,9 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get openPlaylist => 'Open playlist';
+ @override
+ String get openCollection => 'Open collection';
+
@override
String get playlistPlayAction => 'Play playlist';
@@ -2410,6 +2416,12 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get chapters => 'Chapters';
+ @override
+ String get noChaptersBook => 'This book has no chapters';
+
+ @override
+ String get noChaptersPodcast => 'This podcast has no chapters';
+
@override
String get failedToLoad => 'Failed to load';
diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart
index 265d04ab..037c96d3 100644
--- a/lib/l10n/app_localizations_zh.dart
+++ b/lib/l10n/app_localizations_zh.dart
@@ -1100,6 +1100,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get queueModePlaylist => 'Playlist';
+ @override
+ String get queueModeCollection => 'Collection';
+
@override
String get queueModeInfoPlaylist => 'Playlist Queue';
@@ -1142,6 +1145,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get openPlaylist => 'Open playlist';
+ @override
+ String get openCollection => 'Open collection';
+
@override
String get playlistPlayAction => 'Play playlist';
@@ -2347,6 +2353,12 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get chapters => '章节';
+ @override
+ String get noChaptersBook => 'This book has no chapters';
+
+ @override
+ String get noChaptersPodcast => 'This podcast has no chapters';
+
@override
String get failedToLoad => '加载失败';
diff --git a/lib/widgets/absorbing_card.dart b/lib/widgets/absorbing_card.dart
index f2983141..f7e46700 100644
--- a/lib/widgets/absorbing_card.dart
+++ b/lib/widgets/absorbing_card.dart
@@ -475,7 +475,9 @@ class AbsorbingCardState extends State<AbsorbingCard> with AutomaticKeepAliveCli
// In gradient/off mode the cover image isn't painted, so derive its scheme separately.
if (_cardBackground != 'blurred') _ensureCoverScheme();
- final showBookBar = (!_isPodcastEpisode || _chapters.isNotEmpty) && (!lib.isPodcastLibrary || _chapters.isNotEmpty);
+ // A chapterless book gets the same single-bar look as a chapterless
+ // podcast: no top book bar, just the scrubber bar carrying the title.
+ final showBookBar = _chapters.isNotEmpty;
return GestureDetector(
onVerticalDragEnd: (details) {
final vy = details.primaryVelocity ?? 0;
@@ -826,7 +828,7 @@ class AbsorbingCardState extends State<AbsorbingCard> with AutomaticKeepAliveCli
final scrubberBar = Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
- child: CardDualProgressBar(player: widget.player, accent: accent, isActive: _isActive, staticProgress: (_isPodcastEpisode && _chapters.isEmpty) ? 0.0 : progress, staticDuration: (_isPodcastEpisode && _chapters.isEmpty) ? widget.player.totalDuration : _effectiveDuration, chapters: _chapters, showBookBar: false, showChapterBar: true, chapterName: (_isPodcastEpisode && _chapters.isEmpty) ? (widget.player.currentEpisodeTitle ?? widget.player.currentTitle ?? _title) : (_episodeId != null && !_isActive ? (_recentEpisode?['title'] as String? ?? _title) : _chapterName(chapterIdx)), chapterIndex: chapterIdx, totalChapters: totalChapters, itemId: _itemId, compact: compact),
+ child: CardDualProgressBar(player: widget.player, accent: accent, isActive: _isActive, staticProgress: (_isPodcastEpisode && _chapters.isEmpty) ? 0.0 : progress, staticDuration: (_isPodcastEpisode && _chapters.isEmpty) ? widget.player.totalDuration : _effectiveDuration, chapters: _chapters, showBookBar: false, showChapterBar: true, chapterName: (_isPodcastEpisode && _chapters.isEmpty) ? (widget.player.currentEpisodeTitle ?? widget.player.currentTitle ?? _title) : (_episodeId != null && !_isActive ? (_recentEpisode?['title'] as String? ?? _title) : (_chapters.isEmpty ? _title : _chapterName(chapterIdx))), chapterIndex: chapterIdx, totalChapters: totalChapters, itemId: _itemId, compact: compact),
);
final controlsRow = Padding(
diff --git a/lib/widgets/card_buttons.dart b/lib/widgets/card_buttons.dart
index 54863bdf..8340a95c 100644
--- a/lib/widgets/card_buttons.dart
+++ b/lib/widgets/card_buttons.dart
@@ -1506,7 +1506,7 @@ class CardActionDelegate {
return CardWideButton(
icon: Icons.list_rounded, label: l.chapters,
accent: accent, isActive: true, alwaysEnabled: true, large: large, compact: compact, iconsOnly: iconsOnly,
- onTap: chapters.isNotEmpty ? () => showChapters(context, accent, tt) : null,
+ onTap: chapters.isNotEmpty ? () => showChapters(context, accent, tt) : _showNoChapters,
);
case 'speed':
return CardWideButton(
@@ -1629,8 +1629,12 @@ class CardActionDelegate {
case 'chapters':
return MoreMenuItem(
icon: Icons.list_rounded, label: l.chapters, accent: accent,
- enabled: chapters.isNotEmpty,
- onTap: () { Navigator.pop(ctx); showChapters(context, accent, tt); },
+ enabled: true,
+ onTap: () {
+ Navigator.pop(ctx);
+ if (chapters.isEmpty) { _showNoChapters(); return; }
+ showChapters(context, accent, tt);
+ },
);
case 'speed':
return MoreMenuItem(
@@ -1888,6 +1892,15 @@ class CardActionDelegate {
);
}
+ void _showNoChapters() {
+ final l = AppLocalizations.of(context)!;
+ showOverlayToast(
+ context,
+ episodeId != null ? l.noChaptersPodcast : l.noChaptersBook,
+ icon: Icons.list_rounded,
+ );
+ }
+
void showHistory(BuildContext ctx, Color accent, TextTheme tt) {
showModalBottomSheet(
context: ctx, isScrollControlled: true, useSafeArea: true,
diff --git a/lib/widgets/expanded_card.dart b/lib/widgets/expanded_card.dart
index 49d7ccdc..833bd581 100644
--- a/lib/widgets/expanded_card.dart
+++ b/lib/widgets/expanded_card.dart
@@ -564,6 +564,9 @@ class _ExpandedCardState extends State<ExpandedCard> {
final chapterIdx = _currentChapterIndex();
final cast = ChromecastService();
final totalChapters = _isCastingThis ? cast.castingChapters.length : (_isActive ? widget.player.chapters.length : _chapters.length);
+ // A chapterless book gets the same single-bar look as a chapterless
+ // podcast: no top book bar, just the scrubber carrying the title.
+ final showBookBar = _chapters.isNotEmpty;
final double bookProgress;
if (_isCastingThis && cast.castingDuration > 0) {
final castPos = cast.castPosition.inMilliseconds / 1000.0;
@@ -653,7 +656,7 @@ class _ExpandedCardState extends State<ExpandedCard> {
final bookProgressBar = Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
- child: CardDualProgressBar(player: widget.player, accent: accent, isActive: _isActive, staticProgress: progress, staticDuration: _effectiveDuration, chapters: _chapters, showBookBar: (!_isPodcastEpisode || _chapters.isNotEmpty) && (!lib.isPodcastLibrary || _chapters.isNotEmpty), showChapterBar: false, itemId: _itemId),
+ child: CardDualProgressBar(player: widget.player, accent: accent, isActive: _isActive, staticProgress: progress, staticDuration: _effectiveDuration, chapters: _chapters, showBookBar: showBookBar, showChapterBar: false, itemId: _itemId),
);
final coverArea = Padding(
@@ -832,7 +835,7 @@ class _ExpandedCardState extends State<ExpandedCard> {
final chapterScrubber = Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
- child: CardDualProgressBar(player: widget.player, accent: accent, isActive: _isActive, staticProgress: (_isPodcastEpisode && _chapters.isEmpty) ? 0.0 : progress, staticDuration: (_isPodcastEpisode && _chapters.isEmpty) ? widget.player.totalDuration : _effectiveDuration, chapters: _chapters, showBookBar: false, showChapterBar: true, chapterName: (_isPodcastEpisode && _chapters.isEmpty) ? (widget.player.currentEpisodeTitle ?? widget.player.currentTitle ?? _title) : (_episodeId != null && !_isActive ? (_recentEpisode?['title'] as String? ?? _title) : _chapterName(chapterIdx)), chapterIndex: chapterIdx, totalChapters: totalChapters, itemId: _itemId),
+ child: CardDualProgressBar(player: widget.player, accent: accent, isActive: _isActive, staticProgress: (_isPodcastEpisode && _chapters.isEmpty) ? 0.0 : progress, staticDuration: (_isPodcastEpisode && _chapters.isEmpty) ? widget.player.totalDuration : _effectiveDuration, chapters: _chapters, showBookBar: false, showChapterBar: true, chapterName: (_isPodcastEpisode && _chapters.isEmpty) ? (widget.player.currentEpisodeTitle ?? widget.player.currentTitle ?? _title) : (_episodeId != null && !_isActive ? (_recentEpisode?['title'] as String? ?? _title) : (_chapters.isEmpty ? _title : _chapterName(chapterIdx))), chapterIndex: chapterIdx, totalChapters: totalChapters, itemId: _itemId),
);
final controlsAndButtons = MediaQuery(
@@ -908,8 +911,8 @@ class _ExpandedCardState extends State<ExpandedCard> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
statsRow,
- bookProgressBar,
- SizedBox(height: compact ? 4 : 16),
+ if (showBookBar) bookProgressBar,
+ if (showBookBar) SizedBox(height: compact ? 4 : 16),
chapterScrubber,
controlsAndButtons,
],
@@ -921,8 +924,8 @@ class _ExpandedCardState extends State<ExpandedCard> {
return Column(
children: [
statsRow,
- bookProgressBar,
- SizedBox(height: compact ? 4 : 16),
+ if (showBookBar) bookProgressBar,
+ if (showBookBar) SizedBox(height: compact ? 4 : 16),
Expanded(child: coverArea),
SizedBox(height: compact ? 6 : 24),
chapterScrubber,