Merge remote-tracking branch 'origin/dev' into feat/fast-everywhere-bulk-selection
# Conflicts: # lib/screens/chat_screen.dart
This commit is contained in:
commit
d11865b175
58 files changed
+1524
-851
No files matched your search
@@ -2142,6 +2142,9 @@
|
||||
"discoveredContacts_importSummary": "Импортирани: {imported}, пропуснати вече известни: {skipped}, нечетими записи: {invalid}.",
|
||||
"discoveredContacts_importTooLarge": "Файлът за импортиране е твърде голям (максимум {maxMb} MB).",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Когато списъкът с контакти на радиото е пълен, най-старият контакт извън любимите се заменя.",
|
||||
"contactsSettings_hopLimit": "Ограничение на скоковете",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Без ограничение} =1{1 (само директно)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Радиото добавя автоматично само контакти с по-малко скокове от тази стойност. В „Открити контакти“ пак се запазват всички.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Ограничаване на откритите контакти",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Приложението ограничава списъка „Открити контакти“ до {limit} записа. При достигане на лимита по-старите контакти се премахват. Изключете, за да премахнете ограничението.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2975,6 +2975,9 @@
|
||||
"contactsSettings_autoAddSensorsTitle": "Senzory",
|
||||
"contactsSettings_overwriteOldestTitle": "Přepisovat nejstarší",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Když je seznam kontaktů v rádiu plný, nahradí se nejstarší kontakt, který není oblíbený.",
|
||||
"contactsSettings_hopLimit": "Limit skoků",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Bez omezení} =1{1 (pouze přímo)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Rádio automaticky přidá jen kontakty s menším počtem skoků, než je tato hodnota. Seznam „Objevené kontakty“ přesto uloží všechny.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Omezit objevené kontakty",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Aplikace omezuje seznam „Objevené kontakty“ na {limit} položek. Po dosažení limitu jsou starší kontakty odstraněny. Vypněte pro zrušení limitu.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2231,6 +2231,9 @@
|
||||
"discoveredContacts_copyContact": "Kontakt in die Zwischenablage kopieren",
|
||||
"contactsSettings_overwriteOldestTitle": "Ältesten überschreiben",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Wenn die Kontaktliste des Funkgeräts voll ist, den ältesten Kontakt ersetzen, der kein Favorit ist.",
|
||||
"contactsSettings_hopLimit": "Sprunglimit",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Kein Limit} =1{1 (nur direkt)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Das Funkgerät fügt nur Kontakte mit weniger Sprüngen als diesem Wert automatisch hinzu. Unter „Entdeckte Kontakte“ werden trotzdem alle gespeichert.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Entdeckte Kontakte begrenzen",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Die App begrenzt die Liste „Entdeckte Kontakte“ auf {limit} Einträge. Ist das Limit erreicht, werden ältere Kontakte entfernt. Deaktivieren, um das Limit aufzuheben.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
+14
-5
@@ -3296,6 +3296,16 @@
|
||||
"contactsSettings_autoAddSensorsTitle": "Sensors",
|
||||
"contactsSettings_overwriteOldestTitle": "Overwrite oldest",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Replace the oldest non-favorited contact when the radio's contact list is full.",
|
||||
"contactsSettings_hopLimit": "Hop limit",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{No limit} =1{1 (direct only)} other{{hops}}}",
|
||||
"@contactsSettings_hopLimitOption": {
|
||||
"placeholders": {
|
||||
"hops": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactsSettings_hopLimitSubtitle": "The radio only auto-adds contacts under this many hops. Discovered Contacts still saves them all.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Limit discovered contacts",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "The app sets a {limit} entry limit to the discovered contacts list, older contacts are evicted when the limit is reached. Disable to have no limits.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
@@ -4475,7 +4485,7 @@
|
||||
"chatCompression_title": "Compression",
|
||||
"chatCompression_label": "Compression: {mode}",
|
||||
"@chatCompression_label": {
|
||||
"description": "Always-visible control at the top of a chat; mode is Off, SMAZ or Cyr2Lat",
|
||||
"description": "Chat menu item that opens the compression page; mode is Off, SMAZ or Cyr2Lat",
|
||||
"placeholders": {
|
||||
"mode": {
|
||||
"type": "String"
|
||||
@@ -4485,11 +4495,10 @@
|
||||
"chatCompression_off": "Off",
|
||||
"chatCompression_smaz": "SMAZ",
|
||||
"chatCompression_cyr2lat": "Cyr2Lat",
|
||||
"chatCompression_changeHint": "Change compression for this chat",
|
||||
"chatCompression_sheetSubtitle": "Applies to messages you send in this chat. Saved on this phone.",
|
||||
"chatCompression_offDescription": "No compression. Sends your text exactly as typed. Every app can read it. Saves no bytes.",
|
||||
"chatCompression_smazDescription": "Lossless compression for short text. The recipient's app must support SMAZ; other apps show unreadable \"s:…\" text. Only used when it makes a message smaller, so not every message is compressed.",
|
||||
"chatCompression_cyr2latDescription": "Not lossless. Swaps some Cyrillic letters for lookalike Latin ones (А→A, З→3) to save bytes. Readable in any app with no decoding, but the exact characters change, including your own sent messages here. Copying, search and technical text may be affected. Results depend on the chosen profile.",
|
||||
"chatCompression_offDescription": "Sends your text as typed. Every app can read it.",
|
||||
"chatCompression_smazDescription": "Shrinks English text. Used only when the message gets shorter. Apps without SMAZ show \"s:…\" instead of your text.",
|
||||
"chatCompression_cyr2latDescription": "Swaps Cyrillic letters for similar Latin ones (А→A). Every app can read it, but the characters change. Not lossless.",
|
||||
"chatCompression_profile": "Cyr2Lat profile",
|
||||
"chatCompression_noStorageId": "Can't change compression until this channel has synced from the radio.",
|
||||
"chatCompression_saveFailed": "Couldn't save the compression setting. Showing the saved setting.",
|
||||
|
||||
@@ -2162,6 +2162,9 @@
|
||||
"discoveredContacts_searchHint": "Buscar contactos descubiertos",
|
||||
"discoveredContacts_addContact": "Agregar contacto",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Cuando la lista de contactos de la radio esté llena, reemplaza el contacto no favorito más antiguo.",
|
||||
"contactsSettings_hopLimit": "Límite de saltos",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Sin límite} =1{1 (solo directo)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "La radio solo añade automáticamente contactos con menos saltos que este valor. En Contactos descubiertos se siguen guardando todos.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Limitar contactos descubiertos",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "La app limita la lista \"Contactos descubiertos\" a {limit} entradas. Al alcanzar el límite, se eliminan los contactos más antiguos. Desactivar para quitar el límite.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2155,6 +2155,9 @@
|
||||
"discoveredContacts_Title": "Contacts découverts",
|
||||
"discoveredContacts_searchHint": "Rechercher des contacts découverts",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Lorsque la liste de contacts de la radio est pleine, remplace le plus ancien contact non favori.",
|
||||
"contactsSettings_hopLimit": "Limite de sauts",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Aucune limite} =1{1 (direct uniquement)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "La radio n'ajoute automatiquement que les contacts situés à moins de sauts que cette valeur. Ils sont quand même tous enregistrés dans Contacts découverts.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Limiter les contacts découverts",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "L'application limite la liste « Contacts découverts » à {limit} entrées. Une fois la limite atteinte, les contacts les plus anciens sont supprimés. Désactivez pour supprimer la limite.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2227,6 +2227,9 @@
|
||||
"contactsSettings_autoAddSensorsTitle": "Érzékelők",
|
||||
"contactsSettings_overwriteOldestTitle": "A legrégebbi felülírása",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Ha a rádió kapcsolatlistája megtelt, a legrégebbi, nem kedvenc kapcsolat lecserélődik.",
|
||||
"contactsSettings_hopLimit": "Ugráskorlát",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Nincs korlát} =1{1 (csak közvetlen)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "A rádió csak az ennél kevesebb ugrásra lévő kapcsolatokat adja hozzá automatikusan. A „Felfedezett kapcsolatok” lista továbbra is mindet elmenti.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Felfedezett kapcsolatok korlátozása",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Az alkalmazás a „Felfedezett kapcsolatok” listát {limit} bejegyzésre korlátozza. A korlát elérésekor a régebbi kapcsolatok törlődnek. Kikapcsolva nincs korlát.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2204,6 +2204,9 @@
|
||||
}
|
||||
},
|
||||
"contactsSettings_overwriteOldestSubtitle": "Quando l'elenco dei contatti della radio è pieno, sostituisce il contatto più vecchio non tra i preferiti.",
|
||||
"contactsSettings_hopLimit": "Limite di salti",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Nessun limite} =1{1 (solo diretto)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "La radio aggiunge automaticamente solo i contatti con meno salti di questo valore. In Contatti scoperti vengono comunque salvati tutti.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Limita i contatti scoperti",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "L'app limita l'elenco \"Contatti scoperti\" a {limit} voci. Al raggiungimento del limite, i contatti più vecchi vengono rimossi. Disattiva per rimuovere il limite.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2237,6 +2237,9 @@
|
||||
"contactsSettings_autoAddSensorsTitle": "センサー",
|
||||
"contactsSettings_overwriteOldestTitle": "最も古い連絡先を上書き",
|
||||
"contactsSettings_overwriteOldestSubtitle": "ラジオの連絡先リストが満杯になったら、お気に入り以外で最も古い連絡先を置き換えます。",
|
||||
"contactsSettings_hopLimit": "ホップ数の上限",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{制限なし} =1{1(直接のみ)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "ラジオはこの値より少ないホップ数の連絡先のみ自動追加します。「連絡先が見つかった」にはすべて保存されます。",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "発見された連絡先を制限",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "アプリは「連絡先が見つかった」リストを {limit} 件に制限します。上限に達すると古い連絡先から削除されます。オフにすると上限はなくなります。",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2142,6 +2142,9 @@
|
||||
"contactsSettings_autoAddSensorsTitle": "센서",
|
||||
"contactsSettings_overwriteOldestTitle": "가장 오래된 연락처 덮어쓰기",
|
||||
"contactsSettings_overwriteOldestSubtitle": "라디오의 연락처 목록이 가득 차면 즐겨찾기가 아닌 가장 오래된 연락처를 교체합니다.",
|
||||
"contactsSettings_hopLimit": "홉 수 제한",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{제한 없음} =1{1 (직접 연결만)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "라디오는 이 값보다 적은 홉의 연락처만 자동 추가합니다. '연락처 찾기'에는 모두 저장됩니다.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "발견된 연락처 제한",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "앱은 \"연락처 찾기\" 목록을 {limit}개 항목으로 제한합니다. 한도에 도달하면 오래된 연락처부터 삭제됩니다. 끄면 제한이 없습니다.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -10037,6 +10037,24 @@ abstract class AppLocalizations {
|
||||
/// **'Replace the oldest non-favorited contact when the radio\'s contact list is full.'**
|
||||
String get contactsSettings_overwriteOldestSubtitle;
|
||||
|
||||
/// No description provided for @contactsSettings_hopLimit.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Hop limit'**
|
||||
String get contactsSettings_hopLimit;
|
||||
|
||||
/// No description provided for @contactsSettings_hopLimitOption.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'{hops, plural, =0{No limit} =1{1 (direct only)} other{{hops}}}'**
|
||||
String contactsSettings_hopLimitOption(int hops);
|
||||
|
||||
/// No description provided for @contactsSettings_hopLimitSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'The radio only auto-adds contacts under this many hops. Discovered Contacts still saves them all.'**
|
||||
String get contactsSettings_hopLimitSubtitle;
|
||||
|
||||
/// No description provided for @contactsSettings_evictDiscoveredContactsTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -12958,7 +12976,7 @@ abstract class AppLocalizations {
|
||||
/// **'Compression'**
|
||||
String get chatCompression_title;
|
||||
|
||||
/// Always-visible control at the top of a chat; mode is Off, SMAZ or Cyr2Lat
|
||||
/// Chat menu item that opens the compression page; mode is Off, SMAZ or Cyr2Lat
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Compression: {mode}'**
|
||||
@@ -12982,12 +13000,6 @@ abstract class AppLocalizations {
|
||||
/// **'Cyr2Lat'**
|
||||
String get chatCompression_cyr2lat;
|
||||
|
||||
/// No description provided for @chatCompression_changeHint.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Change compression for this chat'**
|
||||
String get chatCompression_changeHint;
|
||||
|
||||
/// No description provided for @chatCompression_sheetSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -12997,19 +13009,19 @@ abstract class AppLocalizations {
|
||||
/// No description provided for @chatCompression_offDescription.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'No compression. Sends your text exactly as typed. Every app can read it. Saves no bytes.'**
|
||||
/// **'Sends your text as typed. Every app can read it.'**
|
||||
String get chatCompression_offDescription;
|
||||
|
||||
/// No description provided for @chatCompression_smazDescription.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Lossless compression for short text. The recipient\'s app must support SMAZ; other apps show unreadable \"s:…\" text. Only used when it makes a message smaller, so not every message is compressed.'**
|
||||
/// **'Shrinks English text. Used only when the message gets shorter. Apps without SMAZ show \"s:…\" instead of your text.'**
|
||||
String get chatCompression_smazDescription;
|
||||
|
||||
/// No description provided for @chatCompression_cyr2latDescription.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Not lossless. Swaps some Cyrillic letters for lookalike Latin ones (А→A, З→3) to save bytes. Readable in any app with no decoding, but the exact characters change, including your own sent messages here. Copying, search and technical text may be affected. Results depend on the chosen profile.'**
|
||||
/// **'Swaps Cyrillic letters for similar Latin ones (А→A). Every app can read it, but the characters change. Not lossless.'**
|
||||
String get chatCompression_cyr2latDescription;
|
||||
|
||||
/// No description provided for @chatCompression_profile.
|
||||
|
||||
@@ -5923,6 +5923,25 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Когато списъкът с контакти на радиото е пълен, най-старият контакт извън любимите се заменя.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Ограничение на скоковете';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (само директно)',
|
||||
zero: 'Без ограничение',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Радиото добавя автоматично само контакти с по-малко скокове от тази стойност. В „Открити контакти“ пак се запазват всички.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Ограничаване на откритите контакти';
|
||||
@@ -7804,9 +7823,6 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Кир→Лат';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Промяна на компресията за този чат';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Важи за съобщенията, които изпращате в този чат. Запазва се на този телефон.';
|
||||
|
||||
@@ -5902,6 +5902,25 @@ class AppLocalizationsCs extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Když je seznam kontaktů v rádiu plný, nahradí se nejstarší kontakt, který není oblíbený.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limit skoků';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (pouze přímo)',
|
||||
zero: 'Bez omezení',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Rádio automaticky přidá jen kontakty s menším počtem skoků, než je tato hodnota. Seznam „Objevené kontakty“ přesto uloží všechny.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Omezit objevené kontakty';
|
||||
@@ -7778,9 +7797,6 @@ class AppLocalizationsCs extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Změnit kompresi pro tento chat';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Platí pro zprávy odeslané v tomto chatu. Uloženo v tomto telefonu.';
|
||||
|
||||
@@ -5934,6 +5934,25 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Wenn die Kontaktliste des Funkgeräts voll ist, den ältesten Kontakt ersetzen, der kein Favorit ist.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Sprunglimit';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (nur direkt)',
|
||||
zero: 'Kein Limit',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Das Funkgerät fügt nur Kontakte mit weniger Sprüngen als diesem Wert automatisch hinzu. Unter „Entdeckte Kontakte“ werden trotzdem alle gespeichert.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Entdeckte Kontakte begrenzen';
|
||||
@@ -7815,9 +7834,6 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Kompression für diesen Chat ändern';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Gilt für Nachrichten, die Sie in diesem Chat senden. Auf diesem Telefon gespeichert.';
|
||||
|
||||
@@ -5842,6 +5842,25 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Replace the oldest non-favorited contact when the radio\'s contact list is full.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Hop limit';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (direct only)',
|
||||
zero: 'No limit',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'The radio only auto-adds contacts under this many hops. Discovered Contacts still saves them all.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Limit discovered contacts';
|
||||
@@ -7689,24 +7708,21 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Change compression for this chat';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Applies to messages you send in this chat. Saved on this phone.';
|
||||
|
||||
@override
|
||||
String get chatCompression_offDescription =>
|
||||
'No compression. Sends your text exactly as typed. Every app can read it. Saves no bytes.';
|
||||
'Sends your text as typed. Every app can read it.';
|
||||
|
||||
@override
|
||||
String get chatCompression_smazDescription =>
|
||||
'Lossless compression for short text. The recipient\'s app must support SMAZ; other apps show unreadable \"s:…\" text. Only used when it makes a message smaller, so not every message is compressed.';
|
||||
'Shrinks English text. Used only when the message gets shorter. Apps without SMAZ show \"s:…\" instead of your text.';
|
||||
|
||||
@override
|
||||
String get chatCompression_cyr2latDescription =>
|
||||
'Not lossless. Swaps some Cyrillic letters for lookalike Latin ones (А→A, З→3) to save bytes. Readable in any app with no decoding, but the exact characters change, including your own sent messages here. Copying, search and technical text may be affected. Results depend on the chosen profile.';
|
||||
'Swaps Cyrillic letters for similar Latin ones (А→A). Every app can read it, but the characters change. Not lossless.';
|
||||
|
||||
@override
|
||||
String get chatCompression_profile => 'Cyr2Lat profile';
|
||||
|
||||
@@ -5923,6 +5923,25 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Cuando la lista de contactos de la radio esté llena, reemplaza el contacto no favorito más antiguo.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Límite de saltos';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (solo directo)',
|
||||
zero: 'Sin límite',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'La radio solo añade automáticamente contactos con menos saltos que este valor. En Contactos descubiertos se siguen guardando todos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Limitar contactos descubiertos';
|
||||
@@ -7796,9 +7815,6 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Cambiar la compresión de este chat';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Se aplica a los mensajes que envíes en este chat. Se guarda en este teléfono.';
|
||||
|
||||
@@ -5937,6 +5937,25 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Lorsque la liste de contacts de la radio est pleine, remplace le plus ancien contact non favori.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limite de sauts';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (direct uniquement)',
|
||||
zero: 'Aucune limite',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'La radio n\'ajoute automatiquement que les contacts situés à moins de sauts que cette valeur. Ils sont quand même tous enregistrés dans Contacts découverts.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Limiter les contacts découverts';
|
||||
@@ -7819,10 +7838,6 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint =>
|
||||
'Modifier la compression de cette discussion';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'S\'applique aux messages que vous envoyez dans cette discussion. Enregistré sur ce téléphone.';
|
||||
|
||||
@@ -5921,6 +5921,25 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Ha a rádió kapcsolatlistája megtelt, a legrégebbi, nem kedvenc kapcsolat lecserélődik.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Ugráskorlát';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (csak közvetlen)',
|
||||
zero: 'Nincs korlát',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'A rádió csak az ennél kevesebb ugrásra lévő kapcsolatokat adja hozzá automatikusan. A „Felfedezett kapcsolatok” lista továbbra is mindet elmenti.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Felfedezett kapcsolatok korlátozása';
|
||||
@@ -7785,10 +7804,6 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint =>
|
||||
'Tömörítés módosítása ebben a csevegésben';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Az ebben a csevegésben küldött üzenetekre vonatkozik. Ezen a telefonon van mentve.';
|
||||
|
||||
@@ -5928,6 +5928,25 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Quando l\'elenco dei contatti della radio è pieno, sostituisce il contatto più vecchio non tra i preferiti.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limite di salti';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (solo diretto)',
|
||||
zero: 'Nessun limite',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'La radio aggiunge automaticamente solo i contatti con meno salti di questo valore. In Contatti scoperti vengono comunque salvati tutti.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Limita i contatti scoperti';
|
||||
@@ -7807,10 +7826,6 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint =>
|
||||
'Cambia la compressione per questa chat';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Si applica ai messaggi che invii in questa chat. Salvato su questo telefono.';
|
||||
|
||||
@@ -5646,6 +5646,25 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'ラジオの連絡先リストが満杯になったら、お気に入り以外で最も古い連絡先を置き換えます。';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'ホップ数の上限';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1(直接のみ)',
|
||||
zero: '制限なし',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'ラジオはこの値より少ないホップ数の連絡先のみ自動追加します。「連絡先が見つかった」にはすべて保存されます。';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle => '発見された連絡先を制限';
|
||||
|
||||
@@ -7449,9 +7468,6 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'このチャットの圧縮設定を変更';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'このチャットで送信するメッセージに適用されます。このスマートフォンに保存されます。';
|
||||
|
||||
@@ -5656,6 +5656,25 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'라디오의 연락처 목록이 가득 차면 즐겨찾기가 아닌 가장 오래된 연락처를 교체합니다.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => '홉 수 제한';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (직접 연결만)',
|
||||
zero: '제한 없음',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'라디오는 이 값보다 적은 홉의 연락처만 자동 추가합니다. \'연락처 찾기\'에는 모두 저장됩니다.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle => '발견된 연락처 제한';
|
||||
|
||||
@@ -7458,9 +7477,6 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => '이 채팅의 압축 설정 변경';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'이 채팅에서 보내는 메시지에 적용됩니다. 이 휴대폰에 저장됩니다.';
|
||||
|
||||
@@ -5894,6 +5894,25 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Als de contactenlijst van de radio vol is, het oudste contact vervangen dat geen favoriet is.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Hoplimiet';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (alleen direct)',
|
||||
zero: 'Geen limiet',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'De radio voegt alleen contacten met minder hops dan deze waarde automatisch toe. In Ontdekte contacten worden ze nog steeds allemaal opgeslagen.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Ontdekte contacten beperken';
|
||||
@@ -7760,9 +7779,6 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Compressie voor deze chat wijzigen';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Geldt voor berichten die je in deze chat verstuurt. Opgeslagen op deze telefoon.';
|
||||
|
||||
@@ -5964,6 +5964,25 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Gdy lista kontaktów w radiu jest pełna, najstarszy kontakt spoza ulubionych zostanie zastąpiony.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limit skoków';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (tylko bezpośrednio)',
|
||||
zero: 'Bez limitu',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Radio automatycznie dodaje tylko kontakty z mniejszą liczbą skoków niż ta wartość. Lista „Odkryte Kontakty” nadal zapisuje wszystkie.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Ogranicz odkryte kontakty';
|
||||
@@ -7849,9 +7868,6 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Zmień kompresję w tej rozmowie';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Dotyczy wiadomości wysyłanych w tej rozmowie. Zapisane na tym telefonie.';
|
||||
|
||||
@@ -5919,6 +5919,25 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Quando a lista de contatos do rádio estiver cheia, substitui o contato mais antigo que não seja favorito.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limite de saltos';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (somente direto)',
|
||||
zero: 'Sem limite',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'O rádio só adiciona automaticamente contatos com menos saltos que este valor. Todos continuam sendo salvos em Contatos Descobertos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Limitar contatos descobertos';
|
||||
@@ -7784,10 +7803,6 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint =>
|
||||
'Alterar a compressão desta conversa';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Vale para as mensagens que você envia nesta conversa. Salvo neste celular.';
|
||||
@@ -14165,6 +14180,25 @@ class AppLocalizationsPtPt extends AppLocalizationsPt {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Quando a lista de contactos do rádio estiver cheia, substitui o contacto mais antigo que não seja favorito.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limite de hops';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (apenas direto)',
|
||||
zero: 'Sem limite',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'O rádio só adiciona automaticamente contactos com menos hops do que este valor. Todos continuam a ser guardados em Contactos descobertos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Limitar contactos descobertos';
|
||||
@@ -16028,10 +16062,6 @@ class AppLocalizationsPtPt extends AppLocalizationsPt {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint =>
|
||||
'Alterar a compressão desta conversa';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Aplica-se às mensagens que envia nesta conversa. Guardado neste telemóvel.';
|
||||
|
||||
@@ -5940,6 +5940,25 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Когда список контактов радио заполнен, заменяется самый старый контакт не из избранного.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Лимит хопов';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (только напрямую)',
|
||||
zero: 'Без лимита',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Радио автоматически добавляет только контакты, до которых меньше хопов, чем это значение. В списке «Обнаруженные контакты» по-прежнему сохраняются все.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Ограничивать обнаруженные контакты';
|
||||
@@ -7828,9 +7847,6 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Кир→Лат';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Изменить сжатие для этого чата';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Действует для сообщений, которые вы отправляете в этом чате. Сохраняется на этом телефоне.';
|
||||
|
||||
@@ -5917,6 +5917,25 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Keď je zoznam kontaktov v rádiu plný, nahradí sa najstarší kontakt, ktorý nie je obľúbený.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limit skokov';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (iba priamo)',
|
||||
zero: 'Bez obmedzenia',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Rádio automaticky pridá iba kontakty s menším počtom skokov, než je táto hodnota. Zoznam „Objavené kontakty“ aj tak uloží všetky.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Obmedziť objavené kontakty';
|
||||
@@ -7787,9 +7806,6 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Zmeniť kompresiu pre tento chat';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Platí pre správy, ktoré v tomto chate odošlete. Uložené v tomto telefóne.';
|
||||
|
||||
@@ -5907,6 +5907,25 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Ko je seznam stikov v radiu poln, se zamenja najstarejši stik, ki ni med priljubljenimi.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Omejitev skokov';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (samo neposredno)',
|
||||
zero: 'Brez omejitve',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Radio avtomatsko doda le stike z manj skoki od te vrednosti. Seznam »Odkriti stiki« še vedno shrani vse.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Omeji odkrite stike';
|
||||
@@ -7787,9 +7806,6 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Spremeni stiskanje za ta klepet';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Velja za sporočila, ki jih pošljete v tem klepetu. Shranjeno v tem telefonu.';
|
||||
|
||||
@@ -5875,6 +5875,25 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'När radions kontaktlista är full ersätts den äldsta kontakten som inte är en favorit.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Hoppgräns';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (endast direkt)',
|
||||
zero: 'Ingen gräns',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Radion lägger bara till kontakter automatiskt om de har färre hopp än detta värde. Alla sparas ändå i Upptäckta kontakter.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Begränsa upptäckta kontakter';
|
||||
@@ -7736,10 +7755,6 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint =>
|
||||
'Ändra komprimering för den här chatten';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Gäller meddelanden du skickar i den här chatten. Sparas på den här telefonen.';
|
||||
|
||||
@@ -5945,6 +5945,25 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Коли список контактів радіо заповнений, замінюється найстаріший контакт, якого немає в улюблених.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Ліміт переходів';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (лише напряму)',
|
||||
zero: 'Без ліміту',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Радіо автоматично додає лише контакти, до яких менше переходів, ніж це значення. У списку «Виявлені контакти» й надалі зберігаються всі.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Обмежувати виявлені контакти';
|
||||
@@ -7842,9 +7861,6 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Кир→Лат';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Змінити стиснення для цього чату';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Діє для повідомлень, які ви надсилаєте в цьому чаті. Зберігається на цьому телефоні.';
|
||||
|
||||
@@ -5518,6 +5518,25 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'无线电的联系人列表已满时,替换最旧的非收藏联系人。';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => '跳数限制';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1(仅直连)',
|
||||
zero: '不限',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'无线电只会自动添加跳数少于此值的联系人。“已发现的联系人”中仍会保存全部。';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle => '限制已发现的联系人';
|
||||
|
||||
@@ -7295,9 +7314,6 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => '更改此聊天的压缩设置';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle => '适用于你在此聊天中发送的消息。保存在本机。';
|
||||
|
||||
|
||||
@@ -2180,6 +2180,9 @@
|
||||
}
|
||||
},
|
||||
"contactsSettings_overwriteOldestSubtitle": "Als de contactenlijst van de radio vol is, het oudste contact vervangen dat geen favoriet is.",
|
||||
"contactsSettings_hopLimit": "Hoplimiet",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Geen limiet} =1{1 (alleen direct)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "De radio voegt alleen contacten met minder hops dan deze waarde automatisch toe. In Ontdekte contacten worden ze nog steeds allemaal opgeslagen.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Ontdekte contacten beperken",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "De app beperkt de lijst \"Ontdekte contacten\" tot {limit} items. Bij het bereiken van de limiet worden oudere contacten verwijderd. Schakel uit om de limiet op te heffen.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2180,6 +2180,9 @@
|
||||
"discoveredContacts_importSummary": "Zaimportowano: {imported}, pominięto już znane: {skipped}, nieczytelne wpisy: {invalid}.",
|
||||
"discoveredContacts_importTooLarge": "Plik importu jest zbyt duży (maksymalnie {maxMb} MB).",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Gdy lista kontaktów w radiu jest pełna, najstarszy kontakt spoza ulubionych zostanie zastąpiony.",
|
||||
"contactsSettings_hopLimit": "Limit skoków",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Bez limitu} =1{1 (tylko bezpośrednio)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Radio automatycznie dodaje tylko kontakty z mniejszą liczbą skoków niż ta wartość. Lista „Odkryte Kontakty” nadal zapisuje wszystkie.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Ogranicz odkryte kontakty",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Aplikacja ogranicza listę „Odkryte Kontakty” do {limit} pozycji. Po osiągnięciu limitu starsze kontakty są usuwane. Wyłącz, aby znieść limit.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2073,6 +2073,9 @@
|
||||
}
|
||||
},
|
||||
"contactsSettings_overwriteOldestSubtitle": "Quando a lista de contatos do rádio estiver cheia, substitui o contato mais antigo que não seja favorito.",
|
||||
"contactsSettings_hopLimit": "Limite de saltos",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Sem limite} =1{1 (somente direto)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "O rádio só adiciona automaticamente contatos com menos saltos que este valor. Todos continuam sendo salvos em Contatos Descobertos.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Limitar contatos descobertos",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "O app limita a lista \"Contatos Descobertos\" a {limit} entradas. Ao atingir o limite, os contatos mais antigos são removidos. Desative para remover o limite.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -1610,6 +1610,9 @@
|
||||
"contactsSettings_autoAddSensorsTitle": "Sensores",
|
||||
"contactsSettings_overwriteOldestTitle": "Substituir o mais antigo",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Quando a lista de contactos do rádio estiver cheia, substitui o contacto mais antigo que não seja favorito.",
|
||||
"contactsSettings_hopLimit": "Limite de hops",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Sem limite} =1{1 (apenas direto)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "O rádio só adiciona automaticamente contactos com menos hops do que este valor. Todos continuam a ser guardados em Contactos descobertos.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Limitar contactos descobertos",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "A app limita a lista \"Contactos descobertos\" a {limit} entradas. Ao atingir o limite, os contactos mais antigos são removidos. Desative para remover o limite.",
|
||||
"discoveredContacts_Title": "Contactos descobertos",
|
||||
|
||||
@@ -1321,6 +1321,9 @@
|
||||
"discoveredContacts_importSummary": "Импортировано: {imported}, пропущено уже известных: {skipped}, нечитаемых записей: {invalid}.",
|
||||
"discoveredContacts_importTooLarge": "Файл импорта слишком большой (максимум {maxMb} МБ).",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Когда список контактов радио заполнен, заменяется самый старый контакт не из избранного.",
|
||||
"contactsSettings_hopLimit": "Лимит хопов",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Без лимита} =1{1 (только напрямую)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Радио автоматически добавляет только контакты, до которых меньше хопов, чем это значение. В списке «Обнаруженные контакты» по-прежнему сохраняются все.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Ограничивать обнаруженные контакты",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Приложение ограничивает список «Обнаруженные контакты» до {limit} записей. При достижении лимита старые контакты удаляются. Отключите, чтобы снять ограничение.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2147,6 +2147,9 @@
|
||||
}
|
||||
},
|
||||
"contactsSettings_overwriteOldestSubtitle": "Keď je zoznam kontaktov v rádiu plný, nahradí sa najstarší kontakt, ktorý nie je obľúbený.",
|
||||
"contactsSettings_hopLimit": "Limit skokov",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Bez obmedzenia} =1{1 (iba priamo)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Rádio automaticky pridá iba kontakty s menším počtom skokov, než je táto hodnota. Zoznam „Objavené kontakty“ aj tak uloží všetky.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Obmedziť objavené kontakty",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Aplikácia obmedzuje zoznam „Objavené kontakty“ na {limit} položiek. Po dosiahnutí limitu sa staršie kontakty odstránia. Vypnite pre zrušenie limitu.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2073,6 +2073,9 @@
|
||||
}
|
||||
},
|
||||
"contactsSettings_overwriteOldestSubtitle": "Ko je seznam stikov v radiu poln, se zamenja najstarejši stik, ki ni med priljubljenimi.",
|
||||
"contactsSettings_hopLimit": "Omejitev skokov",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Brez omejitve} =1{1 (samo neposredno)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Radio avtomatsko doda le stike z manj skoki od te vrednosti. Seznam »Odkriti stiki« še vedno shrani vse.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Omeji odkrite stike",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Aplikacija omeji seznam »Odkriti stiki« na {limit} vnosov. Ko je omejitev dosežena, se starejši stiki odstranijo. Izklopite za odpravo omejitve.",
|
||||
"common_deleteAll": "Izbriši vse",
|
||||
|
||||
@@ -2074,6 +2074,9 @@
|
||||
"discoveredContacts_importSummary": "Importerade: {imported}, hoppade över redan kända: {skipped}, oläsliga poster: {invalid}.",
|
||||
"discoveredContacts_importTooLarge": "Importfilen är för stor (högst {maxMb} MB).",
|
||||
"contactsSettings_overwriteOldestSubtitle": "När radions kontaktlista är full ersätts den äldsta kontakten som inte är en favorit.",
|
||||
"contactsSettings_hopLimit": "Hoppgräns",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Ingen gräns} =1{1 (endast direkt)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Radion lägger bara till kontakter automatiskt om de har färre hopp än detta värde. Alla sparas ändå i Upptäckta kontakter.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Begränsa upptäckta kontakter",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Appen begränsar listan ”Upptäckta kontakter” till {limit} poster. När gränsen nås tas äldre kontakter bort. Stäng av för att ta bort gränsen.",
|
||||
"common_deleteAll": "Ta bort alla",
|
||||
|
||||
@@ -2152,6 +2152,9 @@
|
||||
"discoveredContacts_importSummary": "Імпортовано: {imported}, пропущено вже відомих: {skipped}, нечитабельних записів: {invalid}.",
|
||||
"discoveredContacts_importTooLarge": "Файл імпорту завеликий (максимум {maxMb} МБ).",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Коли список контактів радіо заповнений, замінюється найстаріший контакт, якого немає в улюблених.",
|
||||
"contactsSettings_hopLimit": "Ліміт переходів",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Без ліміту} =1{1 (лише напряму)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Радіо автоматично додає лише контакти, до яких менше переходів, ніж це значення. У списку «Виявлені контакти» й надалі зберігаються всі.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Обмежувати виявлені контакти",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Застосунок обмежує список «Виявлені контакти» до {limit} записів. Коли ліміт досягнуто, старіші контакти видаляються. Вимкніть, щоб зняти обмеження.",
|
||||
"common_deleteAll": "Видалити все",
|
||||
|
||||
@@ -2078,6 +2078,9 @@
|
||||
}
|
||||
},
|
||||
"contactsSettings_overwriteOldestSubtitle": "无线电的联系人列表已满时,替换最旧的非收藏联系人。",
|
||||
"contactsSettings_hopLimit": "跳数限制",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{不限} =1{1(仅直连)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "无线电只会自动添加跳数少于此值的联系人。“已发现的联系人”中仍会保存全部。",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "限制已发现的联系人",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "应用将“已发现的联系人”列表限制为 {limit} 条。达到上限时会移除较旧的联系人。关闭后不限数量。",
|
||||
"common_deleteAll": "删除全部",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
@@ -66,6 +67,7 @@ class ReviewRadio {
|
||||
int _txPowerDbm = ReviewScript.txPowerDbm;
|
||||
int _autoAddFlags =
|
||||
autoAddChatFlag | autoAddRepeaterFlag | autoAddRoomServerFlag;
|
||||
int _autoAddMaxHops = 0;
|
||||
int _timeOffsetSecs = 0;
|
||||
|
||||
/// Frames radio to app. Each event is one complete companion frame.
|
||||
@@ -240,10 +242,17 @@ class ReviewRadio {
|
||||
_emit([ReviewFrames.customVars('gps:0')]);
|
||||
break;
|
||||
case cmdGetAutoAddConfig:
|
||||
_emit([ReviewFrames.autoAddConfig(flags: _autoAddFlags)]);
|
||||
_emit([
|
||||
ReviewFrames.autoAddConfig(
|
||||
flags: _autoAddFlags,
|
||||
maxHops: _autoAddMaxHops,
|
||||
),
|
||||
]);
|
||||
break;
|
||||
case cmdSetAutoAddConfig:
|
||||
if (frame.length >= 2) _autoAddFlags = frame[1];
|
||||
// Like firmware: the optional hop limit, capped at 64.
|
||||
if (frame.length >= 3) _autoAddMaxHops = math.min(frame[2], 64);
|
||||
_emit([ReviewFrames.ok()]);
|
||||
break;
|
||||
case cmdGetAllowedRepeatFreq:
|
||||
|
||||
@@ -54,7 +54,6 @@ import '../widgets/empty_state.dart';
|
||||
import '../widgets/filter_rule_dialog.dart';
|
||||
import '../widgets/filtered_message_ghost.dart';
|
||||
import '../widgets/chat_composer.dart';
|
||||
import '../widgets/chat_compression_selector.dart';
|
||||
import '../widgets/chat_send_pipeline.dart';
|
||||
import '../widgets/chat_zoom_wrapper.dart';
|
||||
import '../widgets/message_bubble_frame.dart';
|
||||
@@ -76,6 +75,7 @@ import '../widgets/share_contact_sheet.dart';
|
||||
import '../widgets/shared_contact_card.dart';
|
||||
import 'app_settings_screen.dart';
|
||||
import 'channel_chat_transcript_grouping.dart';
|
||||
import 'chat_compression_screen.dart';
|
||||
import 'channels_screen.dart' show confirmDeleteChannel, showEditChannelSheet;
|
||||
import 'channel_message_path_screen.dart';
|
||||
import 'map_screen.dart';
|
||||
@@ -599,6 +599,8 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
_toggleChannelFiltering();
|
||||
case 'notifications':
|
||||
showChannelNotificationModeSheet(context, muteKey);
|
||||
case 'compression':
|
||||
_openCompressionScreen();
|
||||
case 'region':
|
||||
openRegionSelectDialog(widget.channel);
|
||||
case 'editChannel':
|
||||
@@ -656,6 +658,20 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'compression',
|
||||
child: _menuRow(
|
||||
Icons.compress,
|
||||
context.l10n.chatCompression_label(
|
||||
chatCompressionModeLabel(
|
||||
context,
|
||||
context.read<MeshCoreConnector>().channelCompressionMode(
|
||||
widget.channel.index,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'region',
|
||||
child: _menuRow(
|
||||
@@ -880,7 +896,6 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
bottom: false,
|
||||
child: Column(
|
||||
children: [
|
||||
_buildCompressionSelector(),
|
||||
Expanded(
|
||||
child: ChatBackdrop(
|
||||
contentKey: _messageAreaKey,
|
||||
@@ -2810,26 +2825,35 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
/// Compression is stored on this phone under the channel's storage ID, so
|
||||
/// it can change while the radio is offline, but not before the slot has
|
||||
/// one.
|
||||
Widget _buildCompressionSelector() {
|
||||
void _openCompressionScreen() {
|
||||
final slot = widget.channel.index;
|
||||
return Consumer2<MeshCoreConnector, AppSettingsService>(
|
||||
builder: (context, connector, settingsService, _) {
|
||||
final hasStorageId = connector.channelIdForSlot(slot) != null;
|
||||
return ChatCompressionSelector(
|
||||
mode: connector.channelCompressionMode(slot),
|
||||
enabled: hasStorageId,
|
||||
disabledReason: hasStorageId
|
||||
? null
|
||||
: context.l10n.chatCompression_noStorageId,
|
||||
profiles: settingsService.settings.cyr2latProfiles,
|
||||
profileId: connector.getChannelCyr2LatProfileId(slot),
|
||||
defaultProfileId: settingsService.settings.selectedCyr2latProfileId,
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final settingsService = context.read<AppSettingsService>();
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ChatCompressionScreen(
|
||||
listenable: Listenable.merge([connector, settingsService]),
|
||||
read: () {
|
||||
final hasStorageId = connector.channelIdForSlot(slot) != null;
|
||||
return ChatCompressionState(
|
||||
mode: connector.channelCompressionMode(slot),
|
||||
enabled: hasStorageId,
|
||||
disabledReason: hasStorageId
|
||||
? null
|
||||
: context.l10n.chatCompression_noStorageId,
|
||||
profiles: settingsService.settings.cyr2latProfiles,
|
||||
profileId: connector.getChannelCyr2LatProfileId(slot),
|
||||
defaultProfileId:
|
||||
settingsService.settings.selectedCyr2latProfileId,
|
||||
);
|
||||
},
|
||||
onModeChanged: (mode) =>
|
||||
connector.setChannelCompressionMode(slot, mode),
|
||||
onProfileChanged: (id) =>
|
||||
connector.setChannelCyr2LatProfileId(slot, id),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../l10n/l10n.dart';
|
||||
import '../models/app_settings.dart';
|
||||
import '../models/chat_compression_mode.dart';
|
||||
import '../widgets/adaptive_app_bar_title.dart';
|
||||
import '../widgets/mesh_nav_tile.dart';
|
||||
import '../widgets/mesh_ui.dart';
|
||||
|
||||
export '../models/chat_compression_mode.dart';
|
||||
|
||||
String chatCompressionModeLabel(BuildContext context, ChatCompressionMode m) {
|
||||
final l10n = context.l10n;
|
||||
return switch (m) {
|
||||
ChatCompressionMode.off => l10n.chatCompression_off,
|
||||
ChatCompressionMode.smaz => l10n.chatCompression_smaz,
|
||||
ChatCompressionMode.cyr2lat => l10n.chatCompression_cyr2lat,
|
||||
};
|
||||
}
|
||||
|
||||
/// What the page shows for one chat, read fresh each time [listenable] fires.
|
||||
class ChatCompressionState {
|
||||
final ChatCompressionMode mode;
|
||||
|
||||
/// False locks the choices; [disabledReason] says why.
|
||||
final bool enabled;
|
||||
final String? disabledReason;
|
||||
|
||||
final List<Cyr2LatProfile> profiles;
|
||||
|
||||
/// The Cyr2Lat profile saved for this chat, if any.
|
||||
final String? profileId;
|
||||
|
||||
/// The app-wide profile, which sending uses when [profileId] is unset or
|
||||
/// no longer exists.
|
||||
final String? defaultProfileId;
|
||||
|
||||
const ChatCompressionState({
|
||||
required this.mode,
|
||||
required this.enabled,
|
||||
this.disabledReason,
|
||||
required this.profiles,
|
||||
required this.profileId,
|
||||
this.defaultProfileId,
|
||||
});
|
||||
|
||||
/// The profile sending actually uses, matching the connector's fallback.
|
||||
String? get effectiveProfileId {
|
||||
bool known(String? id) => profiles.any((p) => p.id == id);
|
||||
if (known(profileId)) return profileId;
|
||||
if (known(defaultProfileId)) return defaultProfileId;
|
||||
return profiles.isEmpty ? null : profiles.first.id;
|
||||
}
|
||||
}
|
||||
|
||||
/// The page behind the chat menu's "Compression: ..." item. Shows the three
|
||||
/// choices with a short note each, plus the Cyr2Lat profile picker.
|
||||
///
|
||||
/// The caller supplies the saved state through [read] (re-read whenever
|
||||
/// [listenable] notifies) and persists changes through the callbacks. A new
|
||||
/// choice shows only once the saved state changes; a callback that throws
|
||||
/// leaves the saved choice in place and shows an error.
|
||||
class ChatCompressionScreen extends StatefulWidget {
|
||||
final Listenable listenable;
|
||||
final ChatCompressionState Function() read;
|
||||
final Future<void> Function(ChatCompressionMode mode) onModeChanged;
|
||||
final Future<void> Function(String profileId) onProfileChanged;
|
||||
|
||||
const ChatCompressionScreen({
|
||||
super.key,
|
||||
required this.listenable,
|
||||
required this.read,
|
||||
required this.onModeChanged,
|
||||
required this.onProfileChanged,
|
||||
});
|
||||
|
||||
@override
|
||||
State<ChatCompressionScreen> createState() => _ChatCompressionScreenState();
|
||||
}
|
||||
|
||||
class _ChatCompressionScreenState extends State<ChatCompressionScreen> {
|
||||
bool _busy = false;
|
||||
bool _failed = false;
|
||||
|
||||
/// Counts failed saves, so the profile picker drops an unsaved choice.
|
||||
int _failures = 0;
|
||||
|
||||
/// Runs one save; a failure keeps the saved state and shows an error.
|
||||
Future<void> _save(Future<void> Function() write) async {
|
||||
if (_busy || !widget.read().enabled) return;
|
||||
setState(() {
|
||||
_busy = true;
|
||||
_failed = false;
|
||||
});
|
||||
var ok = false;
|
||||
try {
|
||||
await write();
|
||||
ok = true;
|
||||
} catch (e) {
|
||||
debugPrint('[ChatCompressionScreen] save failed: $e');
|
||||
}
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_busy = false;
|
||||
_failed = !ok;
|
||||
if (!ok) _failures++;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: AdaptiveAppBarTitle(l10n.chatCompression_title),
|
||||
centerTitle: true,
|
||||
actions: [
|
||||
if (_busy)
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(14),
|
||||
child: SizedBox(
|
||||
width: 20,
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
child: ListenableBuilder(
|
||||
listenable: widget.listenable,
|
||||
builder: (context, _) => _buildBody(context, widget.read()),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildBody(BuildContext context, ChatCompressionState view) {
|
||||
final l10n = context.l10n;
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
final canChange = view.enabled && !_busy;
|
||||
|
||||
Widget option(ChatCompressionMode mode, String description) {
|
||||
return MeshSheetOption(
|
||||
label: chatCompressionModeLabel(context, mode),
|
||||
subtitle: description,
|
||||
selected: view.mode == mode,
|
||||
onTap: canChange ? () => _save(() => widget.onModeChanged(mode)) : null,
|
||||
);
|
||||
}
|
||||
|
||||
final profileValue = view.effectiveProfileId;
|
||||
|
||||
return ListView(
|
||||
padding: const EdgeInsets.only(bottom: 24),
|
||||
children: [
|
||||
if (_failed)
|
||||
MeshCard(
|
||||
color: scheme.errorContainer,
|
||||
borderColor: scheme.errorContainer,
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.error_outline, color: scheme.onErrorContainer),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
l10n.chatCompression_saveFailed,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: scheme.onErrorContainer,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (!view.enabled && view.disabledReason != null)
|
||||
MeshInfoCard(view.disabledReason!),
|
||||
SectionHeader(
|
||||
l10n.chatCompression_title,
|
||||
description: l10n.chatCompression_sheetSubtitle,
|
||||
),
|
||||
MeshCard(
|
||||
padding: EdgeInsets.zero,
|
||||
child: Column(
|
||||
children: [
|
||||
option(
|
||||
ChatCompressionMode.off,
|
||||
l10n.chatCompression_offDescription,
|
||||
),
|
||||
const Divider(height: 1, indent: 16),
|
||||
option(
|
||||
ChatCompressionMode.smaz,
|
||||
l10n.chatCompression_smazDescription,
|
||||
),
|
||||
const Divider(height: 1, indent: 16),
|
||||
option(
|
||||
ChatCompressionMode.cyr2lat,
|
||||
l10n.chatCompression_cyr2latDescription,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (view.mode == ChatCompressionMode.cyr2lat &&
|
||||
view.profiles.isNotEmpty) ...[
|
||||
SectionHeader(l10n.chatCompression_profile),
|
||||
MeshCard(
|
||||
child: DropdownButtonFormField<String>(
|
||||
// The field keeps a picked value internally, so rebuild it
|
||||
// with the saved value after a change or a failure.
|
||||
key: ValueKey('$profileValue#$_failures'),
|
||||
isExpanded: true,
|
||||
initialValue: profileValue,
|
||||
decoration: InputDecoration(
|
||||
labelText: l10n.chatCompression_profile,
|
||||
),
|
||||
items: [
|
||||
for (final profile in view.profiles)
|
||||
DropdownMenuItem(
|
||||
value: profile.id,
|
||||
child: Text(profile.name, overflow: TextOverflow.ellipsis),
|
||||
),
|
||||
],
|
||||
onChanged: canChange
|
||||
? (id) {
|
||||
if (id == null || id == profileValue) return;
|
||||
_save(() => widget.onProfileChanged(id));
|
||||
}
|
||||
: null,
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -38,13 +38,13 @@ import '../services/chat_text_scale_service.dart';
|
||||
import '../services/path_history_service.dart';
|
||||
import '../services/translation_service.dart';
|
||||
import '../widgets/chat_composer.dart';
|
||||
import '../widgets/chat_compression_selector.dart';
|
||||
import '../widgets/chat_send_pipeline.dart';
|
||||
import '../widgets/chat_zoom_wrapper.dart';
|
||||
import '../widgets/message_bubble_frame.dart';
|
||||
import '../widgets/reaction_chips.dart';
|
||||
import '../widgets/chat_day_separator.dart';
|
||||
import 'channel_message_path_screen.dart';
|
||||
import 'chat_compression_screen.dart';
|
||||
import 'contacts_screen.dart' show confirmRemoveContact;
|
||||
import 'map_screen.dart';
|
||||
import 'repeater_hub_screen.dart';
|
||||
@@ -527,6 +527,8 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
);
|
||||
case 'info':
|
||||
_showContactInfo(context);
|
||||
case 'compression':
|
||||
_openCompressionScreen();
|
||||
case 'settings':
|
||||
_showContactSettings(context);
|
||||
case 'showBookmarks':
|
||||
@@ -595,6 +597,20 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
label: context.l10n.room_management,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'compression',
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.compress,
|
||||
label: context.l10n.chatCompression_label(
|
||||
chatCompressionModeLabel(
|
||||
context,
|
||||
connector.contactCompressionMode(
|
||||
widget.contact.publicKeyHex,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'settings',
|
||||
child: MeshMenuItemRow(
|
||||
@@ -668,7 +684,6 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
);
|
||||
return Column(
|
||||
children: [
|
||||
_buildCompressionSelector(connector),
|
||||
Expanded(
|
||||
child: ChatBackdrop(
|
||||
contentKey: _messageAreaKey,
|
||||
@@ -697,22 +712,28 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
|
||||
/// Compression is stored on this phone per contact, so it can change
|
||||
/// while the radio is offline.
|
||||
Widget _buildCompressionSelector(MeshCoreConnector connector) {
|
||||
void _openCompressionScreen() {
|
||||
final keyHex = widget.contact.publicKeyHex;
|
||||
return Consumer<AppSettingsService>(
|
||||
builder: (context, settingsService, _) {
|
||||
return ChatCompressionSelector(
|
||||
mode: connector.contactCompressionMode(keyHex),
|
||||
enabled: true,
|
||||
profiles: settingsService.settings.cyr2latProfiles,
|
||||
profileId: connector.getContactCyr2LatProfileId(keyHex),
|
||||
defaultProfileId: settingsService.settings.selectedCyr2latProfileId,
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final settingsService = context.read<AppSettingsService>();
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ChatCompressionScreen(
|
||||
listenable: Listenable.merge([connector, settingsService]),
|
||||
read: () => ChatCompressionState(
|
||||
mode: connector.contactCompressionMode(keyHex),
|
||||
enabled: true,
|
||||
profiles: settingsService.settings.cyr2latProfiles,
|
||||
profileId: connector.getContactCyr2LatProfileId(keyHex),
|
||||
defaultProfileId: settingsService.settings.selectedCyr2latProfileId,
|
||||
),
|
||||
onModeChanged: (mode) =>
|
||||
connector.setContactCompressionMode(keyHex, mode),
|
||||
onProfileChanged: (id) =>
|
||||
connector.setContactCyr2LatProfileId(keyHex, id),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -865,9 +886,8 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
? AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.primary.withValues(alpha: 0.18),
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
.withValues(alpha: 0.18),
|
||||
borderRadius: BorderRadius.circular(MeshRadii.md),
|
||||
),
|
||||
child: bubble,
|
||||
|
||||
@@ -16,6 +16,7 @@ typedef _ContactForm = ({
|
||||
bool autoAddRoomServers,
|
||||
bool autoAddSensors,
|
||||
bool overwriteOldest,
|
||||
int? maxHops,
|
||||
bool evictDiscovered,
|
||||
});
|
||||
|
||||
@@ -33,6 +34,8 @@ class _ContactSettingsScreenState extends State<ContactSettingsScreen> {
|
||||
late bool _autoAddRoomServers;
|
||||
late bool _autoAddSensors;
|
||||
late bool _overwriteOldest;
|
||||
// Null when the firmware doesn't report a hop limit.
|
||||
int? _maxHops;
|
||||
late bool _evictDiscovered;
|
||||
late _ContactForm _savedForm;
|
||||
|
||||
@@ -45,6 +48,7 @@ class _ContactSettingsScreenState extends State<ContactSettingsScreen> {
|
||||
_autoAddRoomServers = connector.autoAddRoomServers ?? false;
|
||||
_autoAddSensors = connector.autoAddSensors ?? false;
|
||||
_overwriteOldest = connector.autoAddOverwriteOldest ?? false;
|
||||
_maxHops = connector.autoAddMaxHops;
|
||||
_evictDiscovered = context
|
||||
.read<AppSettingsService>()
|
||||
.settings
|
||||
@@ -58,6 +62,7 @@ class _ContactSettingsScreenState extends State<ContactSettingsScreen> {
|
||||
autoAddRoomServers: _autoAddRoomServers,
|
||||
autoAddSensors: _autoAddSensors,
|
||||
overwriteOldest: _overwriteOldest,
|
||||
maxHops: _maxHops,
|
||||
evictDiscovered: _evictDiscovered,
|
||||
);
|
||||
|
||||
@@ -73,6 +78,8 @@ class _ContactSettingsScreenState extends State<ContactSettingsScreen> {
|
||||
autoAddRoomServer: form.autoAddRoomServers,
|
||||
autoAddSensor: form.autoAddSensors,
|
||||
overwriteOldest: form.overwriteOldest,
|
||||
// Sent only when changed, so the frame is otherwise unchanged.
|
||||
maxHops: form.maxHops != _savedForm.maxHops ? form.maxHops : null,
|
||||
),
|
||||
);
|
||||
await connector.sendFrame(buildGetAutoAddFlagsFrame());
|
||||
@@ -168,6 +175,44 @@ class _ContactSettingsScreenState extends State<ContactSettingsScreen> {
|
||||
value: _overwriteOldest,
|
||||
onChanged: (v) => _overwriteOldest = v,
|
||||
),
|
||||
if (_maxHops != null) ...[
|
||||
divider,
|
||||
// Same row shape as SettingsValueSlider: icon, title and
|
||||
// description, with the dropdown under the description.
|
||||
ListTile(
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 4,
|
||||
),
|
||||
leading: const Icon(Icons.linear_scale, size: 24),
|
||||
title: Text(l10n.contactsSettings_hopLimit),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(l10n.contactsSettings_hopLimitSubtitle),
|
||||
const SizedBox(height: 8),
|
||||
DropdownButtonFormField<int>(
|
||||
initialValue: _maxHops,
|
||||
isExpanded: true,
|
||||
// Firmware: 0 = no limit, N = under N hops (max 64).
|
||||
items: [
|
||||
for (var hops = 0; hops <= 64; hops++)
|
||||
DropdownMenuItem(
|
||||
value: hops,
|
||||
child: Text(
|
||||
l10n.contactsSettings_hopLimitOption(hops),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
onChanged: (v) {
|
||||
if (v != null) setState(() => _maxHops = v);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
divider,
|
||||
_switch(
|
||||
// The Discovered Contacts icon.
|
||||
|
||||
@@ -1,364 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
|
||||
import '../l10n/l10n.dart';
|
||||
import '../models/app_settings.dart';
|
||||
import '../models/chat_compression_mode.dart';
|
||||
import '../theme/mesh_theme.dart';
|
||||
import 'mesh_nav_tile.dart';
|
||||
import 'mesh_ui.dart';
|
||||
|
||||
export '../models/chat_compression_mode.dart';
|
||||
|
||||
/// Always-visible "Compression: Off / SMAZ / Cyr2Lat" strip for the top of a
|
||||
/// DM or channel chat. Tapping it opens one sheet with the three choices,
|
||||
/// what each does, and the Cyr2Lat profile picker.
|
||||
///
|
||||
/// The parent supplies the saved state and persists changes through the
|
||||
/// callbacks; this widget only shows a new mode once the parent rebuilds it
|
||||
/// with that mode. A callback that throws leaves the saved mode in place and
|
||||
/// shows an error in the sheet.
|
||||
class ChatCompressionSelector extends StatefulWidget {
|
||||
final ChatCompressionMode mode;
|
||||
|
||||
/// False disables the strip and the sheet; [disabledReason] says why.
|
||||
final bool enabled;
|
||||
final String? disabledReason;
|
||||
|
||||
final List<Cyr2LatProfile> profiles;
|
||||
|
||||
/// The Cyr2Lat profile saved for this chat, if any.
|
||||
final String? profileId;
|
||||
|
||||
/// The app-wide profile, which sending uses when [profileId] is unset or
|
||||
/// no longer exists.
|
||||
final String? defaultProfileId;
|
||||
|
||||
final Future<void> Function(ChatCompressionMode mode) onModeChanged;
|
||||
final Future<void> Function(String profileId) onProfileChanged;
|
||||
|
||||
const ChatCompressionSelector({
|
||||
super.key,
|
||||
required this.mode,
|
||||
required this.enabled,
|
||||
this.disabledReason,
|
||||
required this.profiles,
|
||||
required this.profileId,
|
||||
this.defaultProfileId,
|
||||
required this.onModeChanged,
|
||||
required this.onProfileChanged,
|
||||
});
|
||||
|
||||
/// The profile sending actually uses, matching the connector's fallback.
|
||||
String? get effectiveProfileId {
|
||||
bool known(String? id) => profiles.any((p) => p.id == id);
|
||||
if (known(profileId)) return profileId;
|
||||
if (known(defaultProfileId)) return defaultProfileId;
|
||||
return profiles.isEmpty ? null : profiles.first.id;
|
||||
}
|
||||
|
||||
@override
|
||||
State<ChatCompressionSelector> createState() =>
|
||||
_ChatCompressionSelectorState();
|
||||
}
|
||||
|
||||
String chatCompressionModeLabel(BuildContext context, ChatCompressionMode m) {
|
||||
final l10n = context.l10n;
|
||||
return switch (m) {
|
||||
ChatCompressionMode.off => l10n.chatCompression_off,
|
||||
ChatCompressionMode.smaz => l10n.chatCompression_smaz,
|
||||
ChatCompressionMode.cyr2lat => l10n.chatCompression_cyr2lat,
|
||||
};
|
||||
}
|
||||
|
||||
/// What the open sheet renders. The sheet is a separate route, so it listens
|
||||
/// to this instead of rebuilding with the strip.
|
||||
class _SelectorView {
|
||||
final ChatCompressionMode mode;
|
||||
final bool enabled;
|
||||
final List<Cyr2LatProfile> profiles;
|
||||
final String? profileId;
|
||||
final bool busy;
|
||||
final bool failed;
|
||||
|
||||
/// Counts failed saves, so the profile picker drops an unsaved choice.
|
||||
final int failures;
|
||||
|
||||
const _SelectorView({
|
||||
required this.mode,
|
||||
required this.enabled,
|
||||
required this.profiles,
|
||||
required this.profileId,
|
||||
required this.busy,
|
||||
required this.failed,
|
||||
required this.failures,
|
||||
});
|
||||
}
|
||||
|
||||
class _ChatCompressionSelectorState extends State<ChatCompressionSelector> {
|
||||
late final ValueNotifier<_SelectorView> _view = ValueNotifier(_snapshot());
|
||||
bool _busy = false;
|
||||
bool _failed = false;
|
||||
int _failures = 0;
|
||||
|
||||
_SelectorView _snapshot() => _SelectorView(
|
||||
mode: widget.mode,
|
||||
enabled: widget.enabled,
|
||||
profiles: widget.profiles,
|
||||
profileId: widget.effectiveProfileId,
|
||||
busy: _busy,
|
||||
failed: _failed,
|
||||
failures: _failures,
|
||||
);
|
||||
|
||||
@override
|
||||
void didUpdateWidget(covariant ChatCompressionSelector oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
// The sheet route is not below this widget, so it can't be marked dirty
|
||||
// during this build.
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) {
|
||||
if (mounted) _view.value = _snapshot();
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_view.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void _setBusy(bool busy, {required bool failed}) {
|
||||
setState(() {
|
||||
_busy = busy;
|
||||
_failed = failed;
|
||||
if (failed) _failures++;
|
||||
});
|
||||
_view.value = _snapshot();
|
||||
}
|
||||
|
||||
/// Runs one save; returns whether it succeeded.
|
||||
Future<bool> _save(Future<void> Function() write) async {
|
||||
if (_busy || !widget.enabled) return false;
|
||||
_setBusy(true, failed: false);
|
||||
var ok = false;
|
||||
try {
|
||||
await write();
|
||||
ok = true;
|
||||
} catch (e) {
|
||||
debugPrint('[ChatCompressionSelector] save failed: $e');
|
||||
}
|
||||
if (mounted) _setBusy(false, failed: !ok);
|
||||
return ok;
|
||||
}
|
||||
|
||||
Future<void> _openSheet() async {
|
||||
if (_failed) _setBusy(false, failed: false);
|
||||
await showMeshSheet<void>(
|
||||
context,
|
||||
builder: (sheetContext) => ValueListenableBuilder<_SelectorView>(
|
||||
valueListenable: _view,
|
||||
builder: (sheetContext, view, _) => _buildSheet(sheetContext, view),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSheet(BuildContext context, _SelectorView view) {
|
||||
final l10n = context.l10n;
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
final canChange = view.enabled && !view.busy;
|
||||
|
||||
MeshSheetOption option(ChatCompressionMode mode, String description) {
|
||||
return MeshSheetOption(
|
||||
label: chatCompressionModeLabel(context, mode),
|
||||
subtitle: description,
|
||||
selected: view.mode == mode,
|
||||
onTap: canChange
|
||||
? () async {
|
||||
final ok = await _save(() => widget.onModeChanged(mode));
|
||||
// Cyr2Lat stays open so its profile can be picked.
|
||||
if (ok && mode != ChatCompressionMode.cyr2lat) {
|
||||
if (context.mounted) Navigator.of(context).maybePop();
|
||||
}
|
||||
}
|
||||
: null,
|
||||
);
|
||||
}
|
||||
|
||||
final profileValue = view.profileId;
|
||||
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
BottomSheetHeader(
|
||||
title: l10n.chatCompression_title,
|
||||
subtitle: l10n.chatCompression_sheetSubtitle,
|
||||
trailing: view.busy
|
||||
? const Padding(
|
||||
padding: EdgeInsets.all(8),
|
||||
child: SizedBox(
|
||||
width: 18,
|
||||
height: 18,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
Flexible(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.only(bottom: 16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
if (view.failed)
|
||||
Container(
|
||||
margin: const EdgeInsets.fromLTRB(16, 8, 16, 8),
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: scheme.errorContainer,
|
||||
borderRadius: BorderRadius.circular(MeshRadii.sm),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.error_outline,
|
||||
color: scheme.onErrorContainer,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
l10n.chatCompression_saveFailed,
|
||||
style: Theme.of(context).textTheme.bodyMedium
|
||||
?.copyWith(color: scheme.onErrorContainer),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (!view.enabled && widget.disabledReason != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 8, 16, 8),
|
||||
child: Text(
|
||||
widget.disabledReason!,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
),
|
||||
option(
|
||||
ChatCompressionMode.off,
|
||||
l10n.chatCompression_offDescription,
|
||||
),
|
||||
option(
|
||||
ChatCompressionMode.smaz,
|
||||
l10n.chatCompression_smazDescription,
|
||||
),
|
||||
option(
|
||||
ChatCompressionMode.cyr2lat,
|
||||
l10n.chatCompression_cyr2latDescription,
|
||||
),
|
||||
if (view.mode == ChatCompressionMode.cyr2lat &&
|
||||
view.profiles.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 8, 16, 0),
|
||||
child: DropdownButtonFormField<String>(
|
||||
// The field keeps a picked value internally, so rebuild
|
||||
// it with the saved value after a change or a failure.
|
||||
key: ValueKey('$profileValue#${view.failures}'),
|
||||
isExpanded: true,
|
||||
initialValue: profileValue,
|
||||
decoration: InputDecoration(
|
||||
labelText: l10n.chatCompression_profile,
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
items: [
|
||||
for (final profile in view.profiles)
|
||||
DropdownMenuItem(
|
||||
value: profile.id,
|
||||
child: Text(
|
||||
profile.name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
onChanged: canChange
|
||||
? (id) {
|
||||
if (id == null || id == profileValue) return;
|
||||
_save(() => widget.onProfileChanged(id));
|
||||
}
|
||||
: null,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final scheme = theme.colorScheme;
|
||||
final l10n = context.l10n;
|
||||
final label = l10n.chatCompression_label(
|
||||
chatCompressionModeLabel(context, widget.mode),
|
||||
);
|
||||
final reason = widget.enabled ? null : widget.disabledReason;
|
||||
|
||||
// One short row: the chat already leaves little room for messages at
|
||||
// large text sizes, so a disabled strip explains itself in the sheet.
|
||||
return Material(
|
||||
color: scheme.surfaceContainerLow,
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(bottom: BorderSide(color: scheme.outlineVariant)),
|
||||
),
|
||||
child: MergeSemantics(
|
||||
child: Semantics(
|
||||
button: true,
|
||||
enabled: !_busy,
|
||||
label: reason == null ? label : '$label. $reason',
|
||||
hint: l10n.chatCompression_changeHint,
|
||||
child: InkWell(
|
||||
onTap: _busy ? null : _openSheet,
|
||||
child: ExcludeSemantics(
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(minHeight: 48),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
label,
|
||||
style: theme.textTheme.bodyMedium?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: scheme.onSurface,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
if (_busy)
|
||||
const SizedBox(
|
||||
width: 18,
|
||||
height: 18,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
)
|
||||
else
|
||||
Icon(
|
||||
widget.enabled
|
||||
? Icons.arrow_drop_down
|
||||
: Icons.lock_outline,
|
||||
color: scheme.onSurfaceVariant,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user