Disable l1 translation for audio messages

This commit is contained in:
Kelrap 2026-01-23 10:46:38 -05:00
parent e5fda8c45c
commit f130c35016

View file

@ -154,22 +154,22 @@ class SelectModeController with LemmaEmojiSetter {
}
List<SelectMode> modes = [];
if (messageEvent.event.messageType == MessageTypes.Text) {
final lang = messageEvent.messageDisplayLangCode.split("-").first;
final lang = messageEvent.messageDisplayLangCode.split("-").first;
final matchesL1 = lang ==
MatrixState.pangeaController.userController.userL1!.langCodeShort;
if (messageEvent.event.messageType == MessageTypes.Text) {
final matchesL2 = lang ==
MatrixState.pangeaController.userController.userL2!.langCodeShort;
final matchesL1 = lang ==
MatrixState.pangeaController.userController.userL1!.langCodeShort;
modes = matchesL2
? _textModes
: matchesL1
? []
: [SelectMode.translate];
} else {
modes = _audioModes;
modes = matchesL1 ? [] : _audioModes;
}
if (enableRefresh) {