chore: Remove sentence-level pronunciation (#5306)

This commit is contained in:
ggurdin 2026-01-21 10:53:16 -05:00 committed by GitHub
parent 529f12e028
commit ed1ade783a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 19 deletions

View file

@ -14,9 +14,6 @@ import 'package:fluffychat/pangea/common/utils/async_state.dart';
import 'package:fluffychat/pangea/common/widgets/error_indicator.dart';
import 'package:fluffychat/pangea/events/extensions/pangea_event_extension.dart';
import 'package:fluffychat/pangea/events/models/pangea_token_model.dart';
import 'package:fluffychat/pangea/languages/language_model.dart';
import 'package:fluffychat/pangea/languages/p_language_store.dart';
import 'package:fluffychat/pangea/phonetic_transcription/phonetic_transcription_widget.dart';
import 'package:fluffychat/pangea/toolbar/layout/reading_assistance_mode_enum.dart';
import 'package:fluffychat/pangea/toolbar/message_selection_overlay.dart';
import 'package:fluffychat/pangea/toolbar/reading_assistance/select_mode_buttons.dart';
@ -500,19 +497,19 @@ class _MessageBubbleTranscription extends StatelessWidget {
onClick: onTokenSelected,
isSelected: isTokenSelected,
),
if (MatrixState
.pangeaController.userController.showTranscription)
PhoneticTranscriptionWidget(
text: transcription.transcript.text,
textLanguage: PLanguageStore.byLangCode(
transcription.langCode,
) ??
LanguageModel.unknown,
style: style,
iconColor: style.color,
onTranscriptionFetched: () =>
controller.contentChangedStream.add(true),
),
// if (MatrixState
// .pangeaController.userController.showTranscription)
// PhoneticTranscriptionWidget(
// text: transcription.transcript.text,
// textLanguage: PLanguageStore.byLangCode(
// transcription.langCode,
// ) ??
// LanguageModel.unknown,
// style: style,
// iconColor: style.color,
// onTranscriptionFetched: () =>
// controller.contentChangedStream.add(true),
// ),
],
),
);

View file

@ -90,8 +90,6 @@ class SelectModeController with LemmaEmojiSetter {
ValueNotifier<SelectMode?> selectedMode = ValueNotifier<SelectMode?>(null);
final StreamController contentChangedStream = StreamController.broadcast();
// Sometimes the same token is clicked twice. Setting it to the same value
// won't trigger the notifier, so use the bool for force it to trigger.
ValueNotifier<(PangeaTokenText?, bool)> playTokenNotifier =
@ -104,7 +102,6 @@ class SelectModeController with LemmaEmojiSetter {
_translationLoader.dispose();
_sttTranslationLoader.dispose();
_audioLoader.dispose();
contentChangedStream.close();
}
static List<SelectMode> get _textModes => [