Disable l1 translation for audio messages
This commit is contained in:
parent
e5fda8c45c
commit
f130c35016
1 changed files with 6 additions and 6 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue