Skip to content

A cross platform Audiobookshelf client for Android and iOS

Dart

Drop the read along ready toast and the duplicate listening pill now the card covers both

Barnabas9fc29d1c8515
diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb
index 479be134..381eb9ba 100644
--- a/lib/l10n/app_en.arb
+++ b/lib/l10n/app_en.arb
@@ -4899,7 +4899,6 @@
"readAlongFollowSentence": "Sentence",
"readAlongColor": "Read along color",
"readAlongLost": "Can't find the narration on the page",
- "readAlongReady": "Read along is ready",
"@readAlongLost": {
"description": "Read along pill after 45s of narration that matches nothing on the page"
},
diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart
index da9d668c..5822abc4 100644
--- a/lib/l10n/app_localizations.dart
+++ b/lib/l10n/app_localizations.dart
@@ -15075,12 +15075,6 @@ abstract class AppLocalizations {
/// **'Can\'t find the narration on the page'**
String get readAlongLost;
- /// No description provided for @readAlongReady.
- ///
- /// In en, this message translates to:
- /// **'Read along is ready'**
- String get readAlongReady;
-
/// No description provided for @findInEbook.
///
/// In en, this message translates to:
diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart
index cfce4460..a8408857 100644
--- a/lib/l10n/app_localizations_de.dart
+++ b/lib/l10n/app_localizations_de.dart
@@ -8842,9 +8842,6 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get readAlongLost => 'Can\'t find the narration on the page';
- @override
- String get readAlongReady => 'Read along is ready';
-
@override
String get findInEbook => 'Find in ebook';
diff --git a/lib/l10n/app_localizations_el.dart b/lib/l10n/app_localizations_el.dart
index 36c7cc06..27fdb2c3 100644
--- a/lib/l10n/app_localizations_el.dart
+++ b/lib/l10n/app_localizations_el.dart
@@ -8721,9 +8721,6 @@ class AppLocalizationsEl extends AppLocalizations {
@override
String get readAlongLost => 'Can\'t find the narration on the page';
- @override
- String get readAlongReady => 'Read along is ready';
-
@override
String get findInEbook => 'Find in ebook';
diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart
index 9d91f8fe..21236754 100644
--- a/lib/l10n/app_localizations_en.dart
+++ b/lib/l10n/app_localizations_en.dart
@@ -8721,9 +8721,6 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get readAlongLost => 'Can\'t find the narration on the page';
- @override
- String get readAlongReady => 'Read along is ready';
-
@override
String get findInEbook => 'Find in ebook';
diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart
index 67ab1c70..32082d93 100644
--- a/lib/l10n/app_localizations_es.dart
+++ b/lib/l10n/app_localizations_es.dart
@@ -8723,9 +8723,6 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get readAlongLost => 'Can\'t find the narration on the page';
- @override
- String get readAlongReady => 'Read along is ready';
-
@override
String get findInEbook => 'Find in ebook';
diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart
index fd292321..4c4929fc 100644
--- a/lib/l10n/app_localizations_fr.dart
+++ b/lib/l10n/app_localizations_fr.dart
@@ -8774,9 +8774,6 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get readAlongLost => 'Can\'t find the narration on the page';
- @override
- String get readAlongReady => 'Read along is ready';
-
@override
String get findInEbook => 'Find in ebook';
diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart
index 1184dff8..3a96ef82 100644
--- a/lib/l10n/app_localizations_it.dart
+++ b/lib/l10n/app_localizations_it.dart
@@ -8721,9 +8721,6 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get readAlongLost => 'Can\'t find the narration on the page';
- @override
- String get readAlongReady => 'Read along is ready';
-
@override
String get findInEbook => 'Find in ebook';
diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart
index f5ee4c9b..4bd84518 100644
--- a/lib/l10n/app_localizations_ja.dart
+++ b/lib/l10n/app_localizations_ja.dart
@@ -8721,9 +8721,6 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get readAlongLost => 'Can\'t find the narration on the page';
- @override
- String get readAlongReady => 'Read along is ready';
-
@override
String get findInEbook => 'Find in ebook';
diff --git a/lib/l10n/app_localizations_no.dart b/lib/l10n/app_localizations_no.dart
index f3aef734..22806dc7 100644
--- a/lib/l10n/app_localizations_no.dart
+++ b/lib/l10n/app_localizations_no.dart
@@ -8721,9 +8721,6 @@ class AppLocalizationsNo extends AppLocalizations {
@override
String get readAlongLost => 'Can\'t find the narration on the page';
- @override
- String get readAlongReady => 'Read along is ready';
-
@override
String get findInEbook => 'Find in ebook';
diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart
index a07f7050..1e0af4c2 100644
--- a/lib/l10n/app_localizations_pt.dart
+++ b/lib/l10n/app_localizations_pt.dart
@@ -8721,9 +8721,6 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get readAlongLost => 'Can\'t find the narration on the page';
- @override
- String get readAlongReady => 'Read along is ready';
-
@override
String get findInEbook => 'Find in ebook';
diff --git a/lib/l10n/app_localizations_ro.dart b/lib/l10n/app_localizations_ro.dart
index 13e67b41..2671df3a 100644
--- a/lib/l10n/app_localizations_ro.dart
+++ b/lib/l10n/app_localizations_ro.dart
@@ -8721,9 +8721,6 @@ class AppLocalizationsRo extends AppLocalizations {
@override
String get readAlongLost => 'Can\'t find the narration on the page';
- @override
- String get readAlongReady => 'Read along is ready';
-
@override
String get findInEbook => 'Find in ebook';
diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart
index f9bcc807..64497c21 100644
--- a/lib/l10n/app_localizations_ru.dart
+++ b/lib/l10n/app_localizations_ru.dart
@@ -8726,9 +8726,6 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get readAlongLost => 'Can\'t find the narration on the page';
- @override
- String get readAlongReady => 'Read along is ready';
-
@override
String get findInEbook => 'Find in ebook';
diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart
index 36e5de1a..7fd7a00b 100644
--- a/lib/l10n/app_localizations_zh.dart
+++ b/lib/l10n/app_localizations_zh.dart
@@ -8629,9 +8629,6 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get readAlongLost => 'Can\'t find the narration on the page';
- @override
- String get readAlongReady => 'Read along is ready';
-
@override
String get findInEbook => 'Find in ebook';
diff --git a/lib/widgets/ebook_reader_view.dart b/lib/widgets/ebook_reader_view.dart
index b6e315ec..53524c1a 100644
--- a/lib/widgets/ebook_reader_view.dart
+++ b/lib/widgets/ebook_reader_view.dart
@@ -3748,6 +3748,9 @@ class EbookReaderViewState extends State<EbookReaderView> with WidgetsBindingObs
/// in the bottom chrome, so it is there whenever the controls are.
Widget _readAlongSyncPill(Color fg) {
final svc = LyricsService.instance;
+ // The start-up card already says what the pill would, in the middle of
+ // the page; showing both reads as two different things happening.
+ if (_readAlongPrep != null) return const SizedBox.shrink();
return AnimatedBuilder(
animation: svc,
builder: (context, _) {
@@ -3959,11 +3962,8 @@ class EbookReaderViewState extends State<EbookReaderView> with WidgetsBindingObs
await player.play(logDetail: 'read along ready', fromUi: true);
}
} else if (_readAlongGateWaiting) {
+ // The card leaving and the first sentence lighting up say it all.
_readAlongGateWaiting = false;
- if (!player.isPlaying && mounted) {
- showOverlayToast(context, AppLocalizations.of(context)!.readAlongReady,
- icon: Icons.auto_stories_rounded);
- }
}
final pos = player.position.inMilliseconds / 1000.0;
// Same sync offset the player uses, so headphones don't run the reader's