mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-30 07:18:45 +10:00
add toggle for autmatically translated messages for notification and chat or manual translation on message action. Due to heavy battery usage.
This commit is contained in:
@@ -89,7 +89,22 @@ class TranslationService extends ChangeNotifier {
|
||||
'en';
|
||||
}
|
||||
|
||||
bool shouldTranslateIncoming({
|
||||
bool shouldAutoTranslateIncoming({
|
||||
required String text,
|
||||
required bool isCli,
|
||||
required bool isOutgoing,
|
||||
}) {
|
||||
if (!_settings.autoTranslateIncomingMessages) {
|
||||
return false;
|
||||
}
|
||||
return canTranslateIncoming(
|
||||
text: text,
|
||||
isCli: isCli,
|
||||
isOutgoing: isOutgoing,
|
||||
);
|
||||
}
|
||||
|
||||
bool canTranslateIncoming({
|
||||
required String text,
|
||||
required bool isCli,
|
||||
required bool isOutgoing,
|
||||
|
||||
Reference in New Issue
Block a user