|
|
|
@ -113,6 +113,7 @@ class AppSettings {
|
|
|
|
final int tcpServerPort;
|
|
|
|
final int tcpServerPort;
|
|
|
|
final bool jumpToOldestUnread;
|
|
|
|
final bool jumpToOldestUnread;
|
|
|
|
final bool translationEnabled;
|
|
|
|
final bool translationEnabled;
|
|
|
|
|
|
|
|
final bool autoTranslateIncomingMessages;
|
|
|
|
final String? translationTargetLanguageCode;
|
|
|
|
final String? translationTargetLanguageCode;
|
|
|
|
final bool composerTranslationEnabled;
|
|
|
|
final bool composerTranslationEnabled;
|
|
|
|
final String? translationModelSourceUrl;
|
|
|
|
final String? translationModelSourceUrl;
|
|
|
|
@ -166,6 +167,7 @@ class AppSettings {
|
|
|
|
this.tcpServerPort = 0,
|
|
|
|
this.tcpServerPort = 0,
|
|
|
|
this.jumpToOldestUnread = false,
|
|
|
|
this.jumpToOldestUnread = false,
|
|
|
|
this.translationEnabled = false,
|
|
|
|
this.translationEnabled = false,
|
|
|
|
|
|
|
|
this.autoTranslateIncomingMessages = true,
|
|
|
|
this.translationTargetLanguageCode,
|
|
|
|
this.translationTargetLanguageCode,
|
|
|
|
this.composerTranslationEnabled = false,
|
|
|
|
this.composerTranslationEnabled = false,
|
|
|
|
this.translationModelSourceUrl,
|
|
|
|
this.translationModelSourceUrl,
|
|
|
|
@ -226,6 +228,7 @@ class AppSettings {
|
|
|
|
'tcp_server_port': tcpServerPort,
|
|
|
|
'tcp_server_port': tcpServerPort,
|
|
|
|
'jump_to_oldest_unread': jumpToOldestUnread,
|
|
|
|
'jump_to_oldest_unread': jumpToOldestUnread,
|
|
|
|
'translation_enabled': translationEnabled,
|
|
|
|
'translation_enabled': translationEnabled,
|
|
|
|
|
|
|
|
'auto_translate_incoming_messages': autoTranslateIncomingMessages,
|
|
|
|
'translation_target_language_code': translationTargetLanguageCode,
|
|
|
|
'translation_target_language_code': translationTargetLanguageCode,
|
|
|
|
'composer_translation_enabled': composerTranslationEnabled,
|
|
|
|
'composer_translation_enabled': composerTranslationEnabled,
|
|
|
|
'translation_model_source_url': translationModelSourceUrl,
|
|
|
|
'translation_model_source_url': translationModelSourceUrl,
|
|
|
|
@ -307,6 +310,8 @@ class AppSettings {
|
|
|
|
tcpServerPort: json['tcp_server_port'] as int? ?? 0,
|
|
|
|
tcpServerPort: json['tcp_server_port'] as int? ?? 0,
|
|
|
|
jumpToOldestUnread: json['jump_to_oldest_unread'] as bool? ?? false,
|
|
|
|
jumpToOldestUnread: json['jump_to_oldest_unread'] as bool? ?? false,
|
|
|
|
translationEnabled: json['translation_enabled'] as bool? ?? false,
|
|
|
|
translationEnabled: json['translation_enabled'] as bool? ?? false,
|
|
|
|
|
|
|
|
autoTranslateIncomingMessages:
|
|
|
|
|
|
|
|
json['auto_translate_incoming_messages'] as bool? ?? true,
|
|
|
|
translationTargetLanguageCode:
|
|
|
|
translationTargetLanguageCode:
|
|
|
|
json['translation_target_language_code'] as String?,
|
|
|
|
json['translation_target_language_code'] as String?,
|
|
|
|
composerTranslationEnabled:
|
|
|
|
composerTranslationEnabled:
|
|
|
|
@ -396,6 +401,7 @@ class AppSettings {
|
|
|
|
int? tcpServerPort,
|
|
|
|
int? tcpServerPort,
|
|
|
|
bool? jumpToOldestUnread,
|
|
|
|
bool? jumpToOldestUnread,
|
|
|
|
bool? translationEnabled,
|
|
|
|
bool? translationEnabled,
|
|
|
|
|
|
|
|
bool? autoTranslateIncomingMessages,
|
|
|
|
Object? translationTargetLanguageCode = _unset,
|
|
|
|
Object? translationTargetLanguageCode = _unset,
|
|
|
|
bool? composerTranslationEnabled,
|
|
|
|
bool? composerTranslationEnabled,
|
|
|
|
Object? translationModelSourceUrl = _unset,
|
|
|
|
Object? translationModelSourceUrl = _unset,
|
|
|
|
@ -453,6 +459,8 @@ class AppSettings {
|
|
|
|
tcpServerPort: tcpServerPort ?? this.tcpServerPort,
|
|
|
|
tcpServerPort: tcpServerPort ?? this.tcpServerPort,
|
|
|
|
jumpToOldestUnread: jumpToOldestUnread ?? this.jumpToOldestUnread,
|
|
|
|
jumpToOldestUnread: jumpToOldestUnread ?? this.jumpToOldestUnread,
|
|
|
|
translationEnabled: translationEnabled ?? this.translationEnabled,
|
|
|
|
translationEnabled: translationEnabled ?? this.translationEnabled,
|
|
|
|
|
|
|
|
autoTranslateIncomingMessages:
|
|
|
|
|
|
|
|
autoTranslateIncomingMessages ?? this.autoTranslateIncomingMessages,
|
|
|
|
translationTargetLanguageCode: translationTargetLanguageCode == _unset
|
|
|
|
translationTargetLanguageCode: translationTargetLanguageCode == _unset
|
|
|
|
? this.translationTargetLanguageCode
|
|
|
|
? this.translationTargetLanguageCode
|
|
|
|
: translationTargetLanguageCode as String?,
|
|
|
|
: translationTargetLanguageCode as String?,
|
|
|
|
|