diff --git a/lib/pangea/utils/instructions.dart b/lib/pangea/utils/instructions.dart index f606291df..62863a2aa 100644 --- a/lib/pangea/utils/instructions.dart +++ b/lib/pangea/utils/instructions.dart @@ -78,6 +78,7 @@ class InstructionsController { String transformTargetKey, { bool showToggle = true, Widget? customContent, + bool forceShow = false, }) async { final bool userLangsSet = await _pangeaController.userController.areUserLanguagesSet; @@ -85,12 +86,12 @@ class InstructionsController { return; } - if (_instructionsShown[key.toString()] ?? false) { + if ((_instructionsShown[key.toString()] ?? false) && !forceShow) { return; } _instructionsShown[key.toString()] = true; - if (key.toggledOff()) { + if (key.toggledOff() && !forceShow) { return; } if (L10n.of(context) == null) { diff --git a/lib/pangea/widgets/chat/missing_voice_button.dart b/lib/pangea/widgets/chat/missing_voice_button.dart index 67c94494b..6648eb56c 100644 --- a/lib/pangea/widgets/chat/missing_voice_button.dart +++ b/lib/pangea/widgets/chat/missing_voice_button.dart @@ -27,6 +27,10 @@ class MissingVoiceButton extends StatelessWidget { @override Widget build(BuildContext context) { + if (kIsWeb || !Platform.isAndroid) { + return const SizedBox(); + } + return TextButton( style: ButtonStyle( backgroundColor: WidgetStateProperty.all( diff --git a/lib/pangea/widgets/chat/tts_controller.dart b/lib/pangea/widgets/chat/tts_controller.dart index 4c178d440..8258225f5 100644 --- a/lib/pangea/widgets/chat/tts_controller.dart +++ b/lib/pangea/widgets/chat/tts_controller.dart @@ -98,6 +98,7 @@ class TtsController { padding: EdgeInsets.only(top: 12), child: MissingVoiceButton(), ), + forceShow: true, ); return; } @@ -112,6 +113,13 @@ class TtsController { if (isLanguageFullySupported) { await speak(text); } else { + ErrorHandler.logError( + e: 'Language not supported by TTS engine', + data: { + 'targetLanguage': targetLanguage, + 'availableLangCodes': availableLangCodes, + }, + ); await showMissingVoicePopup(context, eventID); } } diff --git a/pubspec.yaml b/pubspec.yaml index 68e11b762..1a7a12f0c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,7 +6,7 @@ description: Learn a language while texting your friends. # Pangea# publish_to: none # On version bump also increase the build number for F-Droid -version: 1.23.8+3567 +version: 1.23.9+3568 environment: sdk: ">=3.0.0 <4.0.0"