Merge pull request #5380 from pangeachat/no-l1-translation

Disable l1 translation for audio messages
This commit is contained in:
ggurdin 2026-01-23 10:51:51 -05:00 committed by GitHub
commit e8a5a21931
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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) {