From 9db2307ea050419e05a20dd0c134477fdfb6353a Mon Sep 17 00:00:00 2001 From: ZIER Date: Mon, 3 Aug 2026 09:04:36 +0200 Subject: [PATCH 1/6] add setting to enable eviction of discovered contacts in settings --- lib/connector/meshcore_connector.dart | 6 ++- lib/l10n/app_de.arb | 4 +- lib/l10n/app_en.arb | 2 + lib/l10n/app_localizations.dart | 12 +++++ lib/l10n/app_localizations_bg.dart | 8 ++++ lib/l10n/app_localizations_de.dart | 8 ++++ lib/l10n/app_localizations_en.dart | 8 ++++ lib/l10n/app_localizations_es.dart | 8 ++++ lib/l10n/app_localizations_fr.dart | 8 ++++ lib/l10n/app_localizations_hu.dart | 8 ++++ lib/l10n/app_localizations_it.dart | 8 ++++ lib/l10n/app_localizations_ja.dart | 8 ++++ lib/l10n/app_localizations_ko.dart | 8 ++++ lib/l10n/app_localizations_nl.dart | 8 ++++ lib/l10n/app_localizations_pl.dart | 8 ++++ lib/l10n/app_localizations_pt.dart | 8 ++++ lib/l10n/app_localizations_ru.dart | 8 ++++ lib/l10n/app_localizations_sk.dart | 8 ++++ lib/l10n/app_localizations_sl.dart | 8 ++++ lib/l10n/app_localizations_sv.dart | 8 ++++ lib/l10n/app_localizations_uk.dart | 8 ++++ lib/l10n/app_localizations_zh.dart | 8 ++++ lib/models/app_settings.dart | 14 ++++-- lib/screens/app_settings_screen.dart | 4 +- lib/screens/channel_chat_screen.dart | 18 +++----- lib/screens/channels_screen.dart | 3 +- lib/screens/settings_screen.dart | 18 +++++++- lib/services/app_settings_service.dart | 6 +++ test/models/model_changes_test.dart | 5 ++ untranslated.json | 64 +++++++++++++++++++------- 30 files changed, 260 insertions(+), 40 deletions(-) diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index 4e3ac7d8..34b4ac9c 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -1077,7 +1077,8 @@ class MeshCoreConnector extends ChangeNotifier { final cached = await _discoveryContactStore.loadContacts(); // Trim a previously-saved oversized list down to the freshest entries so a // device that grew unbounded before the cap existed recovers on load. - if (cached.length > _maxDiscoveredContacts) { + if (_appSettingsService?.settings.evictDiscoveredContactsEnabled == true && + cached.length > _maxDiscoveredContacts) { cached.sort((a, b) => b.lastSeen.compareTo(a.lastSeen)); cached.removeRange(_maxDiscoveredContacts, cached.length); unawaited(_discoveryContactStore.saveContacts(cached)); @@ -7201,7 +7202,8 @@ class MeshCoreConnector extends ChangeNotifier { flags: 0, ); - if (_discoveredContacts.length >= _maxDiscoveredContacts) { + if (_appSettingsService?.settings.evictDiscoveredContactsEnabled == true && + _discoveredContacts.length >= _maxDiscoveredContacts) { _evictStalestDiscoveredContact(); } _discoveredContacts.add(disContact); diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index f5cc3685..3a34e388 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -2129,6 +2129,7 @@ "contactsSettings_autoAddUsersTitle": "Automatische Hinzufügung von Benutzern", "settings_contactSettingsSubtitle": "Einstellungen für das Hinzufügen von Kontakten", "contactsSettings_autoAddSensorsTitle": "Automatisch Sensoren hinzufügen", + "contactsSettings_autoAddSensorsSubtitle": "Ermöglichen Sie dem Begleiter, automatisch entdeckte Sensoren hinzuzufügen", "contactsSettings_autoAddUsersSubtitle": "Ermöglichen Sie dem Begleiter, automatisch entdeckte Benutzer hinzuzufügen", "contactsSettings_autoAddRoomServersTitle": "Automatisch Raumservers hinzufügen", "contactsSettings_autoAddRoomServersSubtitle": "Ermöglichen Sie dem Begleiter, entdeckte Raumserver automatisch hinzuzufügen", @@ -2142,8 +2143,9 @@ "discoveredContacts_Title": "Entdeckte Kontakte", "discoveredContacts_copyContact": "Kontakt in die Zwischenablage kopieren", "contactsSettings_overwriteOldestTitle": "Überschreiben des Ältesten", - "contactsSettings_autoAddSensorsSubtitle": "Ermöglichen Sie dem Begleiter, automatisch entdeckte Sensoren hinzuzufügen", "contactsSettings_overwriteOldestSubtitle": "Wenn die Kontaktliste voll ist, wird der älteste nicht favorisierte Kontakt ersetzt.", + "contactsSettings_evictDiscoveredContactsTitle": "Kürze entdeckte Kontakte Liste", + "contactsSettings_evictDiscoveredContactsSubtitle": "Wenn aktiviert, wird die Liste der entdeckten Kontackte auf 500 Kontakten begrenzt.", "common_deleteAll": "Alles löschen", "discoveredContacts_deleteContactAllContent": "Sind Sie sicher, dass Sie alle gefundenen Kontakte löschen möchten?", "discoveredContacts_deleteContactAll": "Alle entdeckten Kontakte löschen", diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 9c9c8286..aa6419da 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -2459,6 +2459,8 @@ "contactsSettings_autoAddSensorsSubtitle": "Allow the companion to automatically add discovered sensors.", "contactsSettings_overwriteOldestTitle": "Overwrite Oldest", "contactsSettings_overwriteOldestSubtitle": "When the contact list is full, the oldest non-favorited contact will be replaced.", + "contactsSettings_evictDiscoveredContactsTitle": "Evict discovered contacts", + "contactsSettings_evictDiscoveredContactsSubtitle": "When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.", "discoveredContacts_Title": "Discovered Contacts", "discoveredContacts_noMatching": "No matching contacts", "discoveredContacts_searchHint": "Search discovered contacts", diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 2ad4638e..f0c60357 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -7564,6 +7564,18 @@ abstract class AppLocalizations { /// **'When the contact list is full, the oldest non-favorited contact will be replaced.'** String get contactsSettings_overwriteOldestSubtitle; + /// No description provided for @contactsSettings_evictDiscoveredContactsTitle. + /// + /// In en, this message translates to: + /// **'Evict discovered contacts'** + String get contactsSettings_evictDiscoveredContactsTitle; + + /// No description provided for @contactsSettings_evictDiscoveredContactsSubtitle. + /// + /// In en, this message translates to: + /// **'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'** + String get contactsSettings_evictDiscoveredContactsSubtitle; + /// No description provided for @discoveredContacts_Title. /// /// In en, this message translates to: diff --git a/lib/l10n/app_localizations_bg.dart b/lib/l10n/app_localizations_bg.dart index 41c11438..3eafc324 100644 --- a/lib/l10n/app_localizations_bg.dart +++ b/lib/l10n/app_localizations_bg.dart @@ -4393,6 +4393,14 @@ class AppLocalizationsBg extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'Когато списъкът с контакти е пълен, най-старият неключов контакт ще бъде заменен.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Открити контакти'; diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index 5da89506..e95aeb98 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -4402,6 +4402,14 @@ class AppLocalizationsDe extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'Wenn die Kontaktliste voll ist, wird der älteste nicht favorisierte Kontakt ersetzt.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Kürze entdeckte Kontakte Liste'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'Wenn aktiviert, wird die Liste der entdeckten Kontackte auf 500 Kontakten begrenzt.'; + @override String get discoveredContacts_Title => 'Entdeckte Kontakte'; diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index ccdd9ed0..c92fd833 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -4325,6 +4325,14 @@ class AppLocalizationsEn extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'When the contact list is full, the oldest non-favorited contact will be replaced.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Discovered Contacts'; diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index da679126..7cfabee9 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -4396,6 +4396,14 @@ class AppLocalizationsEs extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'Cuando la lista de contactos esté llena, se reemplazará el contacto no favorito más antiguo.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Contactos descubiertos'; diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index 29022552..4fae0b8a 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -4415,6 +4415,14 @@ class AppLocalizationsFr extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'Lorsque la liste de contacts est pleine, le contact le plus ancien non favori sera remplacé.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Contacts découverts'; diff --git a/lib/l10n/app_localizations_hu.dart b/lib/l10n/app_localizations_hu.dart index 7fa5c541..4ff5a1bc 100644 --- a/lib/l10n/app_localizations_hu.dart +++ b/lib/l10n/app_localizations_hu.dart @@ -4391,6 +4391,14 @@ class AppLocalizationsHu extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'Amikor a névjegylista megtelik, a legrégebbi, nem kedvenc névjegy lecserélődik.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Felfedezett kapcsolatok'; diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index 0e01ff91..4fb7cfe9 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -4402,6 +4402,14 @@ class AppLocalizationsIt extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'Quando l\'elenco dei contatti è pieno, il contatto più vecchio non tra i preferiti verrà sostituito.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Contatti scoperti'; diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index e16d6419..0b1e71b8 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -4177,6 +4177,14 @@ class AppLocalizationsJa extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => '連絡先リストが満杯になった場合、最も古いかつ「お気に入り」ではない連絡先が削除されます。'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => '連絡先が見つかった'; diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart index 209867fe..36d9a6ce 100644 --- a/lib/l10n/app_localizations_ko.dart +++ b/lib/l10n/app_localizations_ko.dart @@ -4185,6 +4185,14 @@ class AppLocalizationsKo extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => '연락처 목록이 가득 차면, 가장 오래된 (선호하지 않은) 연락처가 대체됩니다.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => '연락처 찾기'; diff --git a/lib/l10n/app_localizations_nl.dart b/lib/l10n/app_localizations_nl.dart index bf33733a..643e8d7d 100644 --- a/lib/l10n/app_localizations_nl.dart +++ b/lib/l10n/app_localizations_nl.dart @@ -4380,6 +4380,14 @@ class AppLocalizationsNl extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'Wanneer de contactenlijst vol is, wordt de oudste niet-favoriete contactpersoon vervangen.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Ontdekte contacten'; diff --git a/lib/l10n/app_localizations_pl.dart b/lib/l10n/app_localizations_pl.dart index f0f57506..64d5a6df 100644 --- a/lib/l10n/app_localizations_pl.dart +++ b/lib/l10n/app_localizations_pl.dart @@ -4419,6 +4419,14 @@ class AppLocalizationsPl extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'Gdy lista kontaktów jest pełna, najstarszy nieulubiony kontakt zostanie zastąpiony.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Odkryte Kontakty'; diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index 55c2fa48..c44c2b60 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -4396,6 +4396,14 @@ class AppLocalizationsPt extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'Quando a lista de contatos estiver cheia, o contato mais antigo não favoritado será substituído.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Contatos Descobertos'; diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index d32b69a4..9a571fa4 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -4412,6 +4412,14 @@ class AppLocalizationsRu extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'Когда список контактов заполнен, будет заменен самый старый контакт, который не находится в избранном.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Обнаруженные контакты'; diff --git a/lib/l10n/app_localizations_sk.dart b/lib/l10n/app_localizations_sk.dart index 5ee8ec33..86a3ce04 100644 --- a/lib/l10n/app_localizations_sk.dart +++ b/lib/l10n/app_localizations_sk.dart @@ -4380,6 +4380,14 @@ class AppLocalizationsSk extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'Keď je zoznam kontaktov plný, bude nahradený najstarší neoznačený kontakt.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Objavené kontakty'; diff --git a/lib/l10n/app_localizations_sl.dart b/lib/l10n/app_localizations_sl.dart index 07d1bd4f..119c8def 100644 --- a/lib/l10n/app_localizations_sl.dart +++ b/lib/l10n/app_localizations_sl.dart @@ -4377,6 +4377,14 @@ class AppLocalizationsSl extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'Ko je seznam stikov poln, bo najstarejši nestarševski stik zamenjan.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Odkriti stiki'; diff --git a/lib/l10n/app_localizations_sv.dart b/lib/l10n/app_localizations_sv.dart index 8bdd20f9..23ec6bf9 100644 --- a/lib/l10n/app_localizations_sv.dart +++ b/lib/l10n/app_localizations_sv.dart @@ -4350,6 +4350,14 @@ class AppLocalizationsSv extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'När kontaktlistan är full ersätts den äldsta icke-favoriterade kontakten.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Upptäckta kontakter'; diff --git a/lib/l10n/app_localizations_uk.dart b/lib/l10n/app_localizations_uk.dart index 2e87ba8d..d0b51c2e 100644 --- a/lib/l10n/app_localizations_uk.dart +++ b/lib/l10n/app_localizations_uk.dart @@ -4408,6 +4408,14 @@ class AppLocalizationsUk extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => 'Коли список контактів заповнений, найстарший контакт без позначки улюбленого буде замінений.'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => 'Виявлені контакти'; diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index fa2813c3..0b422596 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -4075,6 +4075,14 @@ class AppLocalizationsZh extends AppLocalizations { String get contactsSettings_overwriteOldestSubtitle => '当联系人列表已满时,将替换最老的非收藏联系人。'; + @override + String get contactsSettings_evictDiscoveredContactsTitle => + 'Evict discovered contacts'; + + @override + String get contactsSettings_evictDiscoveredContactsSubtitle => + 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + @override String get discoveredContacts_Title => '已发现的联系人'; diff --git a/lib/models/app_settings.dart b/lib/models/app_settings.dart index a6f82100..6c076cff 100644 --- a/lib/models/app_settings.dart +++ b/lib/models/app_settings.dart @@ -76,8 +76,7 @@ class Cyr2LatProfile { class AppSettings { static const Object _unset = Object(); - static const String stadiaDemo = - '51bd0381-4685-4666-bae8-48940f6d77c0'; + static const String stadiaDemo = '51bd0381-4685-4666-bae8-48940f6d77c0'; final bool clearPathOnMaxRetry; final bool mapShowRepeaters; @@ -116,6 +115,7 @@ class AppSettings { final UnitSystem unitSystem; final Set mutedChannels; final bool mapShowDiscoveryContacts; + final bool evictDiscoveredContactsEnabled; final String tcpServerAddress; final int tcpServerPort; final bool jumpToOldestUnread; @@ -137,8 +137,7 @@ class AppSettings { return apiKey; } - bool get usesstadiaDemo => - effectiveMapTileApiKey == stadiaDemo; + bool get usesstadiaDemo => effectiveMapTileApiKey == stadiaDemo; Map get cyr2latCharMap { final profile = cyr2latProfiles.firstWhere( @@ -186,6 +185,7 @@ class AppSettings { this.unitSystem = UnitSystem.metric, Set? mutedChannels, this.mapShowDiscoveryContacts = true, + this.evictDiscoveredContactsEnabled = false, this.tcpServerAddress = '', this.tcpServerPort = 0, this.jumpToOldestUnread = false, @@ -253,6 +253,7 @@ class AppSettings { 'unit_system': unitSystem.value, 'muted_channels': mutedChannels.toList(), 'map_show_discovery_contacts': mapShowDiscoveryContacts, + 'evict_discovered_contacts_enabled': evictDiscoveredContactsEnabled, 'tcp_server_address': tcpServerAddress, 'tcp_server_port': tcpServerPort, 'jump_to_oldest_unread': jumpToOldestUnread, @@ -342,6 +343,8 @@ class AppSettings { {}, mapShowDiscoveryContacts: json['map_show_discovery_contacts'] as bool? ?? true, + evictDiscoveredContactsEnabled: + json['evict_discovered_contacts_enabled'] as bool? ?? false, tcpServerAddress: json['tcp_server_address'] as String? ?? '', tcpServerPort: json['tcp_server_port'] as int? ?? 0, jumpToOldestUnread: json['jump_to_oldest_unread'] as bool? ?? false, @@ -438,6 +441,7 @@ class AppSettings { UnitSystem? unitSystem, Set? mutedChannels, bool? mapShowDiscoveryContacts, + bool? evictDiscoveredContactsEnabled, String? tcpServerAddress, int? tcpServerPort, bool? jumpToOldestUnread, @@ -505,6 +509,8 @@ class AppSettings { mutedChannels: mutedChannels ?? this.mutedChannels, mapShowDiscoveryContacts: mapShowDiscoveryContacts ?? this.mapShowDiscoveryContacts, + evictDiscoveredContactsEnabled: + evictDiscoveredContactsEnabled ?? this.evictDiscoveredContactsEnabled, tcpServerAddress: tcpServerAddress ?? this.tcpServerAddress, tcpServerPort: tcpServerPort ?? this.tcpServerPort, jumpToOldestUnread: jumpToOldestUnread ?? this.jumpToOldestUnread, diff --git a/lib/screens/app_settings_screen.dart b/lib/screens/app_settings_screen.dart index 90a0a132..8405beca 100644 --- a/lib/screens/app_settings_screen.dart +++ b/lib/screens/app_settings_screen.dart @@ -1153,9 +1153,7 @@ class AppSettingsScreen extends StatelessWidget { ) { final currentApiKey = settingsService.settings.mapTileApiKey?.trim() ?? ''; final maskedApiKey = _maskApiKey( - currentApiKey.isEmpty - ? AppSettings.stadiaDemo - : currentApiKey, + currentApiKey.isEmpty ? AppSettings.stadiaDemo : currentApiKey, ); final controller = TextEditingController(text: maskedApiKey); showDialog( diff --git a/lib/screens/channel_chat_screen.dart b/lib/screens/channel_chat_screen.dart index ce170aed..2e7c3b68 100644 --- a/lib/screens/channel_chat_screen.dart +++ b/lib/screens/channel_chat_screen.dart @@ -700,9 +700,9 @@ class _ChannelChatScreenState extends State { child: Text( context.l10n.channels_via( _formatPathPrefixes( - displayPath, - displayPathHashWidth, - ), + displayPath, + displayPathHashWidth, + ), ), style: MeshTheme.mono( fontSize: 9.5 * textScale, @@ -1214,25 +1214,19 @@ class _ChannelChatScreenState extends State { decoration: InputDecoration( hintText: context.l10n.chat_typeMessage, border: OutlineInputBorder( - borderRadius: BorderRadius.circular( - MeshRadii.md, - ), + borderRadius: BorderRadius.circular(MeshRadii.md), borderSide: BorderSide( color: scheme.outlineVariant, ), ), enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular( - MeshRadii.md, - ), + borderRadius: BorderRadius.circular(MeshRadii.md), borderSide: BorderSide( color: scheme.outlineVariant, ), ), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular( - MeshRadii.md, - ), + borderRadius: BorderRadius.circular(MeshRadii.md), borderSide: BorderSide( color: scheme.primary, width: 1.5, diff --git a/lib/screens/channels_screen.dart b/lib/screens/channels_screen.dart index fb5039d2..1867f5de 100644 --- a/lib/screens/channels_screen.dart +++ b/lib/screens/channels_screen.dart @@ -412,7 +412,8 @@ class _ChannelsScreenState extends State final messages = connector.getChannelMessages(channel); final lastMessage = messages.isNotEmpty ? messages.last : null; final lastMessageText = lastMessage?.text ?? ''; - final lastPreview = lastMessageText.isNotEmpty && + final lastPreview = + lastMessageText.isNotEmpty && GifHelper.parseGif(lastMessageText) != null ? context.l10n.chat_receivedGif : lastMessageText; diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index 17cca639..55c64c32 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -1168,6 +1168,9 @@ class _SettingsScreenState extends State { bool autoAddRoomServer = false; bool autoAddSensor = false; bool overwriteOldest = false; + final appSettingsService = context.read(); + bool evictDiscoveredContactsEnabled = + appSettingsService.settings.evictDiscoveredContactsEnabled; final connector = context.read(); autoAddChat = connector.autoAddUsers ?? false; @@ -1229,6 +1232,15 @@ class _SettingsScreenState extends State { setDialogState(() => overwriteOldest = value); }, ), + const Divider(height: 4), + FeatureToggleRow( + title: l10n.contactsSettings_evictDiscoveredContactsTitle, + subtitle: l10n.contactsSettings_evictDiscoveredContactsSubtitle, + value: evictDiscoveredContactsEnabled, + onChanged: (value) { + setDialogState(() => evictDiscoveredContactsEnabled = value); + }, + ), ], ), ), @@ -1238,7 +1250,10 @@ class _SettingsScreenState extends State { child: Text(l10n.common_cancel), ), TextButton( - onPressed: () { + onPressed: () async { + await appSettingsService.setEvictDiscoveredContactsEnabled( + evictDiscoveredContactsEnabled, + ); _sendSettings( connector, autoAddChat, @@ -1247,6 +1262,7 @@ class _SettingsScreenState extends State { autoAddSensor, overwriteOldest, ); + if (!mounted) return; Navigator.pop(context); }, child: Text(l10n.common_save), diff --git a/lib/services/app_settings_service.dart b/lib/services/app_settings_service.dart index e695ba99..cd5dc8ab 100644 --- a/lib/services/app_settings_service.dart +++ b/lib/services/app_settings_service.dart @@ -223,6 +223,12 @@ class AppSettingsService extends ChangeNotifier { await updateSettings(_settings.copyWith(mapShowDiscoveryContacts: value)); } + Future setEvictDiscoveredContactsEnabled(bool value) async { + await updateSettings( + _settings.copyWith(evictDiscoveredContactsEnabled: value), + ); + } + Future setBatteryChemistryForDevice( String deviceId, String chemistry, diff --git a/test/models/model_changes_test.dart b/test/models/model_changes_test.dart index cc218c95..dbce1d39 100644 --- a/test/models/model_changes_test.dart +++ b/test/models/model_changes_test.dart @@ -385,6 +385,7 @@ void main() { expect(settings.routeWeightSuccessIncrement, equals(0.5)); expect(settings.routeWeightFailureDecrement, equals(0.2)); expect(settings.maxMessageRetries, equals(5)); + expect(settings.evictDiscoveredContactsEnabled, isFalse); }); test('toJson includes all new fields', () { @@ -395,11 +396,13 @@ void main() { expect(json.containsKey('route_weight_success_increment'), isTrue); expect(json.containsKey('route_weight_failure_decrement'), isTrue); expect(json.containsKey('max_message_retries'), isTrue); + expect(json.containsKey('evict_discovered_contacts_enabled'), isFalse); expect(json['max_route_weight'], equals(5.0)); expect(json['initial_route_weight'], equals(3.0)); expect(json['route_weight_success_increment'], equals(0.5)); expect(json['route_weight_failure_decrement'], equals(0.2)); expect(json['max_message_retries'], equals(5)); + expect(json['evict_discovered_contacts_enabled'], isFalse); }); test('fromJson reads all new fields', () { @@ -409,6 +412,7 @@ void main() { 'route_weight_success_increment': 1.0, 'route_weight_failure_decrement': 1.5, 'max_message_retries': 8, + 'evict_discovered_contacts_enabled': false, }; final settings = AppSettings.fromJson(json); expect(settings.maxRouteWeight, equals(10.0)); @@ -416,6 +420,7 @@ void main() { expect(settings.routeWeightSuccessIncrement, equals(1.0)); expect(settings.routeWeightFailureDecrement, equals(1.5)); expect(settings.maxMessageRetries, equals(8)); + expect(settings.evictDiscoveredContactsEnabled, isFalse); }); test( diff --git a/untranslated.json b/untranslated.json index 14f7f7cc..dc0e7883 100644 --- a/untranslated.json +++ b/untranslated.json @@ -30,7 +30,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "de": [ @@ -85,7 +87,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "fr": [ @@ -119,7 +123,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "hu": [ @@ -153,7 +159,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "it": [ @@ -187,7 +195,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "ja": [ @@ -221,7 +231,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "ko": [ @@ -255,7 +267,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "nl": [ @@ -289,7 +303,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "pl": [ @@ -323,7 +339,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "pt": [ @@ -357,7 +375,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "ru": [ @@ -391,7 +411,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "sk": [ @@ -425,7 +447,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "sl": [ @@ -459,7 +483,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "sv": [ @@ -493,7 +519,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "uk": [ @@ -527,7 +555,9 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ], "zh": [ @@ -561,6 +591,8 @@ "repeater_pubKey", "repeater_pubKeyHelper", "repeater_pubKeyPrefix", - "repeater_pubKeyPrefixHelper" + "repeater_pubKeyPrefixHelper", + "contactsSettings_evictDiscoveredContactsTitle", + "contactsSettings_evictDiscoveredContactsSubtitle" ] } From 8cd7016cba68c847bae2b0bfe8c9015e0b8f9fe4 Mon Sep 17 00:00:00 2001 From: ericz Date: Tue, 4 Aug 2026 17:31:06 +0200 Subject: [PATCH 2/6] dart format and fix test/screens/path_trace_test.dart --- lib/screens/settings_screen.dart | 7 +++++-- test/models/model_changes_test.dart | 1 - test/screens/path_trace_test.dart | 14 ++++++++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index 55c64c32..27bbed0f 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -1235,10 +1235,13 @@ class _SettingsScreenState extends State { const Divider(height: 4), FeatureToggleRow( title: l10n.contactsSettings_evictDiscoveredContactsTitle, - subtitle: l10n.contactsSettings_evictDiscoveredContactsSubtitle, + subtitle: + l10n.contactsSettings_evictDiscoveredContactsSubtitle, value: evictDiscoveredContactsEnabled, onChanged: (value) { - setDialogState(() => evictDiscoveredContactsEnabled = value); + setDialogState( + () => evictDiscoveredContactsEnabled = value, + ); }, ), ], diff --git a/test/models/model_changes_test.dart b/test/models/model_changes_test.dart index dbce1d39..6ef241bf 100644 --- a/test/models/model_changes_test.dart +++ b/test/models/model_changes_test.dart @@ -648,7 +648,6 @@ void main() { expect(contacts.first.path, equals(Uint8List.fromList([0x11, 0x22]))); }, ); - }); group('AppSettingsService — gps interval fallback', () { diff --git a/test/screens/path_trace_test.dart b/test/screens/path_trace_test.dart index 55c10b14..74b2b37a 100644 --- a/test/screens/path_trace_test.dart +++ b/test/screens/path_trace_test.dart @@ -22,7 +22,8 @@ class _FakeStorageService extends StorageService { ContactPathHistory history, ) async {} @override - Future loadPathHistory(String contactPubKeyHex) async => null; + Future loadPathHistory(String contactPubKeyHex) async => + null; @override Future clearPathHistory(String contactPubKeyHex) async {} } @@ -71,13 +72,18 @@ Widget _buildTestApp({ required MeshCoreConnector connector, required Widget child, }) { + final appSettingsService = AppSettingsService(); + return MultiProvider( providers: [ ChangeNotifierProvider.value(value: connector), - ChangeNotifierProvider( - create: (_) => AppSettingsService(), + ChangeNotifierProvider.value( + value: appSettingsService, + ), + ChangeNotifierProvider( + create: (_) => + MapTileCacheService(appSettingsService: appSettingsService), ), - Provider(create: (_) => MapTileCacheService()), ChangeNotifierProvider( create: (_) => PathHistoryService(_FakeStorageService()), ), From c92415a0ff842634c9c72b994937a9fe859101e1 Mon Sep 17 00:00:00 2001 From: ericz Date: Tue, 4 Aug 2026 17:38:17 +0200 Subject: [PATCH 3/6] fix context mounted check --- lib/screens/settings_screen.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index 27bbed0f..697af86c 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -1265,7 +1265,7 @@ class _SettingsScreenState extends State { autoAddSensor, overwriteOldest, ); - if (!mounted) return; + if (!context.mounted) return; Navigator.pop(context); }, child: Text(l10n.common_save), From 0834509950786818a1739d207847b5da2b367401 Mon Sep 17 00:00:00 2001 From: ericz Date: Tue, 4 Aug 2026 17:52:33 +0200 Subject: [PATCH 4/6] fix forgotten default setting change in test. --- test/models/model_changes_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/models/model_changes_test.dart b/test/models/model_changes_test.dart index 6ef241bf..e742267e 100644 --- a/test/models/model_changes_test.dart +++ b/test/models/model_changes_test.dart @@ -396,7 +396,7 @@ void main() { expect(json.containsKey('route_weight_success_increment'), isTrue); expect(json.containsKey('route_weight_failure_decrement'), isTrue); expect(json.containsKey('max_message_retries'), isTrue); - expect(json.containsKey('evict_discovered_contacts_enabled'), isFalse); + expect(json.containsKey('evict_discovered_contacts_enabled'), isTrue); expect(json['max_route_weight'], equals(5.0)); expect(json['initial_route_weight'], equals(3.0)); expect(json['route_weight_success_increment'], equals(0.5)); From 1323bf13b67e83cec0cef915da28810db64c9ac4 Mon Sep 17 00:00:00 2001 From: ericz Date: Tue, 8 Sep 2026 18:05:11 +0200 Subject: [PATCH 5/6] Trim an oversized list when enabling eviction --- lib/connector/meshcore_connector.dart | 17 ++++++++++++++--- lib/screens/settings_screen.dart | 3 +++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index e6969d99..6db7f11e 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -1112,9 +1112,7 @@ class MeshCoreConnector extends ChangeNotifier { // Trim a previously-saved oversized list down to the freshest entries so a // device that grew unbounded before the cap existed recovers on load. if (_appSettingsService?.settings.evictDiscoveredContactsEnabled == true && - cached.length > _maxDiscoveredContacts) { - cached.sort((a, b) => b.lastSeen.compareTo(a.lastSeen)); - cached.removeRange(_maxDiscoveredContacts, cached.length); + _trimDiscoveredContactsToLimit(cached)) { unawaited(_discoveryContactStore.saveContacts(cached)); } _discoveredContacts @@ -1122,6 +1120,19 @@ class MeshCoreConnector extends ChangeNotifier { ..addAll(cached); } + bool _trimDiscoveredContactsToLimit(List contacts) { + if (contacts.length <= _maxDiscoveredContacts) return false; + contacts.sort((a, b) => b.lastSeen.compareTo(a.lastSeen)); + contacts.removeRange(_maxDiscoveredContacts, contacts.length); + return true; + } + + Future trimDiscoveredContactsToLimit() async { + if (!_trimDiscoveredContactsToLimit(_discoveredContacts)) return; + await _persistDiscoveredContacts(); + notifyListeners(); + } + Future loadChannelSettings({int? maxChannels}) async { _channelSmazEnabled.clear(); _channelCyr2LatEnabled.clear(); diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index 838ebfb4..4e2cb8ff 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -1269,6 +1269,9 @@ class _SettingsScreenState extends State { await appSettingsService.setEvictDiscoveredContactsEnabled( evictDiscoveredContactsEnabled, ); + if (evictDiscoveredContactsEnabled) { + await connector.trimDiscoveredContactsToLimit(); + } _sendSettings( connector, autoAddChat, From ef53b8f390f0b72f070c6734e85159414b8b3c60 Mon Sep 17 00:00:00 2001 From: zjs81 Date: Wed, 7 Oct 2026 21:12:59 -0700 Subject: [PATCH 6/6] Default discovered-contact eviction on and harden the auto-add dialog - Default evictDiscoveredContactsEnabled to true so the 500-entry cap stays in effect unless the user opts out - Evict until under the cap when adding, so an oversized list recovers - Pass the cap into the localized subtitle instead of hard-coding 500 - Fix German title and subtitle wording - Save: block double taps, send radio config first, show an error if persisting the setting fails - Restore untranslated.json to match dev --- lib/connector/meshcore_connector.dart | 23 ++-- lib/l10n/app_de.arb | 11 +- lib/l10n/app_en.arb | 9 +- lib/l10n/app_localizations.dart | 4 +- lib/l10n/app_localizations_bg.dart | 5 +- lib/l10n/app_localizations_de.dart | 7 +- lib/l10n/app_localizations_en.dart | 5 +- lib/l10n/app_localizations_es.dart | 5 +- lib/l10n/app_localizations_fr.dart | 5 +- lib/l10n/app_localizations_hu.dart | 5 +- lib/l10n/app_localizations_it.dart | 5 +- lib/l10n/app_localizations_ja.dart | 5 +- lib/l10n/app_localizations_ko.dart | 5 +- lib/l10n/app_localizations_nl.dart | 5 +- lib/l10n/app_localizations_pl.dart | 5 +- lib/l10n/app_localizations_pt.dart | 5 +- lib/l10n/app_localizations_ru.dart | 5 +- lib/l10n/app_localizations_sk.dart | 5 +- lib/l10n/app_localizations_sl.dart | 5 +- lib/l10n/app_localizations_sv.dart | 5 +- lib/l10n/app_localizations_uk.dart | 5 +- lib/l10n/app_localizations_zh.dart | 5 +- lib/models/app_settings.dart | 4 +- lib/screens/settings_screen.dart | 57 ++++++---- test/models/model_changes_test.dart | 4 +- untranslated.json | 149 +------------------------- 26 files changed, 130 insertions(+), 223 deletions(-) diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index 123016eb..d5eb2282 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -180,7 +180,7 @@ class MeshCoreConnector extends ChangeNotifier { // continuously from the whole mesh, so without a bound this list grows for // as long as the app stays connected. When full, the stalest node (oldest // lastSeen) is evicted to make room for a newly heard one. - static const int _maxDiscoveredContacts = 500; + static const int maxDiscoveredContacts = 500; MeshCoreConnectionState _state = MeshCoreConnectionState.disconnected; BluetoothDevice? _device; @@ -1356,9 +1356,10 @@ class MeshCoreConnector extends ChangeNotifier { Future _loadDiscoveredContactCache() async { final cached = await _discoveryContactStore.loadContacts(); - // Trim a previously-saved oversized list down to the freshest entries so a - // device that grew unbounded before the cap existed recovers on load. - if (_appSettingsService?.settings.evictDiscoveredContactsEnabled == true && + // When eviction is enabled, trim a previously-saved oversized list down to + // the freshest entries so a device that grew unbounded before the cap + // existed recovers on load. + if (_evictDiscoveredContactsEnabled && _trimDiscoveredContactsToLimit(cached)) { unawaited(_discoveryContactStore.saveContacts(cached)); } @@ -1367,10 +1368,13 @@ class MeshCoreConnector extends ChangeNotifier { ..addAll(cached); } + bool get _evictDiscoveredContactsEnabled => + _appSettingsService?.settings.evictDiscoveredContactsEnabled ?? true; + bool _trimDiscoveredContactsToLimit(List contacts) { - if (contacts.length <= _maxDiscoveredContacts) return false; + if (contacts.length <= maxDiscoveredContacts) return false; contacts.sort((a, b) => b.lastSeen.compareTo(a.lastSeen)); - contacts.removeRange(_maxDiscoveredContacts, contacts.length); + contacts.removeRange(maxDiscoveredContacts, contacts.length); return true; } @@ -8194,9 +8198,10 @@ class MeshCoreConnector extends ChangeNotifier { flags: 0, ); - if (_appSettingsService?.settings.evictDiscoveredContactsEnabled == true && - _discoveredContacts.length >= _maxDiscoveredContacts) { - _evictStalestDiscoveredContact(); + if (_evictDiscoveredContactsEnabled) { + while (_discoveredContacts.length >= maxDiscoveredContacts) { + _evictStalestDiscoveredContact(); + } } _discoveredContacts.add(disContact); diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 733c35cc..ff4527fc 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -2145,8 +2145,15 @@ "discoveredContacts_copyContact": "Kontakt in die Zwischenablage kopieren", "contactsSettings_overwriteOldestTitle": "Überschreiben des Ältesten", "contactsSettings_overwriteOldestSubtitle": "Wenn die Kontaktliste voll ist, wird der älteste nicht favorisierte Kontakt ersetzt.", - "contactsSettings_evictDiscoveredContactsTitle": "Kürze entdeckte Kontakte Liste", - "contactsSettings_evictDiscoveredContactsSubtitle": "Wenn aktiviert, wird die Liste der entdeckten Kontackte auf 500 Kontakten begrenzt.", + "contactsSettings_evictDiscoveredContactsTitle": "Liste entdeckter Kontakte kürzen", + "contactsSettings_evictDiscoveredContactsSubtitle": "Wenn aktiviert, wird die Liste der entdeckten Kontakte auf {limit} Kontakte begrenzt.", + "@contactsSettings_evictDiscoveredContactsSubtitle": { + "placeholders": { + "limit": { + "type": "int" + } + } + }, "common_deleteAll": "Alles löschen", "discoveredContacts_deleteContactAllContent": "Sind Sie sicher, dass Sie alle gefundenen Kontakte löschen möchten?", "discoveredContacts_deleteContactAll": "Alle entdeckten Kontakte löschen", diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index ace29877..06ae5d01 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -2649,7 +2649,14 @@ "contactsSettings_overwriteOldestTitle": "Overwrite Oldest", "contactsSettings_overwriteOldestSubtitle": "When the contact list is full, the oldest non-favorited contact will be replaced.", "contactsSettings_evictDiscoveredContactsTitle": "Evict discovered contacts", - "contactsSettings_evictDiscoveredContactsSubtitle": "When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.", + "contactsSettings_evictDiscoveredContactsSubtitle": "When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of {limit} entries.", + "@contactsSettings_evictDiscoveredContactsSubtitle": { + "placeholders": { + "limit": { + "type": "int" + } + } + }, "discoveredContacts_Title": "Discovered Contacts", "discoveredContacts_noMatching": "No matching contacts", "discoveredContacts_searchHint": "Search discovered contacts", diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 81a34f45..a1ccd08c 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -8215,8 +8215,8 @@ abstract class AppLocalizations { /// No description provided for @contactsSettings_evictDiscoveredContactsSubtitle. /// /// In en, this message translates to: - /// **'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'** - String get contactsSettings_evictDiscoveredContactsSubtitle; + /// **'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of {limit} entries.'** + String contactsSettings_evictDiscoveredContactsSubtitle(int limit); /// No description provided for @discoveredContacts_Title. /// diff --git a/lib/l10n/app_localizations_bg.dart b/lib/l10n/app_localizations_bg.dart index a12ec148..1bd49aad 100644 --- a/lib/l10n/app_localizations_bg.dart +++ b/lib/l10n/app_localizations_bg.dart @@ -4794,8 +4794,9 @@ class AppLocalizationsBg extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Открити контакти'; diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index bd0c4afc..1fd2b632 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -4803,11 +4803,12 @@ class AppLocalizationsDe extends AppLocalizations { @override String get contactsSettings_evictDiscoveredContactsTitle => - 'Kürze entdeckte Kontakte Liste'; + 'Liste entdeckter Kontakte kürzen'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'Wenn aktiviert, wird die Liste der entdeckten Kontackte auf 500 Kontakten begrenzt.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'Wenn aktiviert, wird die Liste der entdeckten Kontakte auf $limit Kontakte begrenzt.'; + } @override String get discoveredContacts_Title => 'Entdeckte Kontakte'; diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index b297ecfc..4af5d2f0 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -4725,8 +4725,9 @@ class AppLocalizationsEn extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Discovered Contacts'; diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index 01605a9a..2c35a02b 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -4797,8 +4797,9 @@ class AppLocalizationsEs extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Contactos descubiertos'; diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index be24acc8..76e862d4 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -4819,8 +4819,9 @@ class AppLocalizationsFr extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Contacts découverts'; diff --git a/lib/l10n/app_localizations_hu.dart b/lib/l10n/app_localizations_hu.dart index 25de36d7..44b737a2 100644 --- a/lib/l10n/app_localizations_hu.dart +++ b/lib/l10n/app_localizations_hu.dart @@ -4793,8 +4793,9 @@ class AppLocalizationsHu extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Felfedezett kapcsolatok'; diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index 3c681e76..d48917c7 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -4803,8 +4803,9 @@ class AppLocalizationsIt extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Contatti scoperti'; diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index 49bad245..872deafe 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -4559,8 +4559,9 @@ class AppLocalizationsJa extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => '連絡先が見つかった'; diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart index 25ae2f8c..18fa4cd9 100644 --- a/lib/l10n/app_localizations_ko.dart +++ b/lib/l10n/app_localizations_ko.dart @@ -4569,8 +4569,9 @@ class AppLocalizationsKo extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => '연락처 찾기'; diff --git a/lib/l10n/app_localizations_nl.dart b/lib/l10n/app_localizations_nl.dart index 0f258b4b..f5959632 100644 --- a/lib/l10n/app_localizations_nl.dart +++ b/lib/l10n/app_localizations_nl.dart @@ -4771,8 +4771,9 @@ class AppLocalizationsNl extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Ontdekte contacten'; diff --git a/lib/l10n/app_localizations_pl.dart b/lib/l10n/app_localizations_pl.dart index d330c3ce..fab6a476 100644 --- a/lib/l10n/app_localizations_pl.dart +++ b/lib/l10n/app_localizations_pl.dart @@ -4826,8 +4826,9 @@ class AppLocalizationsPl extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Odkryte Kontakty'; diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index 6f80b835..da2d61b0 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -4798,8 +4798,9 @@ class AppLocalizationsPt extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Contatos Descobertos'; diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index 3f4060c3..d63112b2 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -4810,8 +4810,9 @@ class AppLocalizationsRu extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Обнаруженные контакты'; diff --git a/lib/l10n/app_localizations_sk.dart b/lib/l10n/app_localizations_sk.dart index ec95f35f..f939911e 100644 --- a/lib/l10n/app_localizations_sk.dart +++ b/lib/l10n/app_localizations_sk.dart @@ -4780,8 +4780,9 @@ class AppLocalizationsSk extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Objavené kontakty'; diff --git a/lib/l10n/app_localizations_sl.dart b/lib/l10n/app_localizations_sl.dart index 31a4da7d..77349499 100644 --- a/lib/l10n/app_localizations_sl.dart +++ b/lib/l10n/app_localizations_sl.dart @@ -4780,8 +4780,9 @@ class AppLocalizationsSl extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Odkriti stiki'; diff --git a/lib/l10n/app_localizations_sv.dart b/lib/l10n/app_localizations_sv.dart index ef46c8f1..eaacb8f3 100644 --- a/lib/l10n/app_localizations_sv.dart +++ b/lib/l10n/app_localizations_sv.dart @@ -4755,8 +4755,9 @@ class AppLocalizationsSv extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Upptäckta kontakter'; diff --git a/lib/l10n/app_localizations_uk.dart b/lib/l10n/app_localizations_uk.dart index dcf31ac6..6bbb580b 100644 --- a/lib/l10n/app_localizations_uk.dart +++ b/lib/l10n/app_localizations_uk.dart @@ -4809,8 +4809,9 @@ class AppLocalizationsUk extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => 'Виявлені контакти'; diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index 8525ffe9..2b7dcffb 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -4444,8 +4444,9 @@ class AppLocalizationsZh extends AppLocalizations { 'Evict discovered contacts'; @override - String get contactsSettings_evictDiscoveredContactsSubtitle => - 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of 500 entries.'; + String contactsSettings_evictDiscoveredContactsSubtitle(int limit) { + return 'When enabled, the app removes the oldest discovered contacts once the discovery list reaches its limit of $limit entries.'; + } @override String get discoveredContacts_Title => '已发现的联系人'; diff --git a/lib/models/app_settings.dart b/lib/models/app_settings.dart index f64aa573..547b1e3e 100644 --- a/lib/models/app_settings.dart +++ b/lib/models/app_settings.dart @@ -227,7 +227,7 @@ class AppSettings { this.unitSystem = UnitSystem.metric, Set? mutedChannels, this.mapShowDiscoveryContacts = true, - this.evictDiscoveredContactsEnabled = false, + this.evictDiscoveredContactsEnabled = true, this.tcpServerAddress = '', this.tcpServerPort = 0, this.jumpToOldestUnread = false, @@ -411,7 +411,7 @@ class AppSettings { mapShowDiscoveryContacts: json['map_show_discovery_contacts'] as bool? ?? true, evictDiscoveredContactsEnabled: - json['evict_discovered_contacts_enabled'] as bool? ?? false, + json['evict_discovered_contacts_enabled'] as bool? ?? true, tcpServerAddress: json['tcp_server_address'] as String? ?? '', tcpServerPort: json['tcp_server_port'] as int? ?? 0, jumpToOldestUnread: json['jump_to_oldest_unread'] as bool? ?? false, diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index 25c0ea21..a43d6051 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -1234,6 +1234,7 @@ class _SettingsScreenState extends State { final appSettingsService = context.read(); bool evictDiscoveredContactsEnabled = appSettingsService.settings.evictDiscoveredContactsEnabled; + bool saving = false; final connector = context.read(); autoAddChat = connector.autoAddUsers ?? false; @@ -1298,8 +1299,10 @@ class _SettingsScreenState extends State { const Divider(height: 4), FeatureToggleRow( title: l10n.contactsSettings_evictDiscoveredContactsTitle, - subtitle: - l10n.contactsSettings_evictDiscoveredContactsSubtitle, + subtitle: l10n + .contactsSettings_evictDiscoveredContactsSubtitle( + MeshCoreConnector.maxDiscoveredContacts, + ), value: evictDiscoveredContactsEnabled, onChanged: (value) { setDialogState( @@ -1316,24 +1319,38 @@ class _SettingsScreenState extends State { child: Text(l10n.common_cancel), ), TextButton( - onPressed: () async { - await appSettingsService.setEvictDiscoveredContactsEnabled( - evictDiscoveredContactsEnabled, - ); - if (evictDiscoveredContactsEnabled) { - await connector.trimDiscoveredContactsToLimit(); - } - _sendSettings( - connector, - autoAddChat, - autoAddRepeater, - autoAddRoomServer, - autoAddSensor, - overwriteOldest, - ); - if (!context.mounted) return; - Navigator.pop(context); - }, + onPressed: saving + ? null + : () async { + setDialogState(() => saving = true); + _sendSettings( + connector, + autoAddChat, + autoAddRepeater, + autoAddRoomServer, + autoAddSensor, + overwriteOldest, + ); + try { + await appSettingsService + .setEvictDiscoveredContactsEnabled( + evictDiscoveredContactsEnabled, + ); + if (evictDiscoveredContactsEnabled) { + await connector.trimDiscoveredContactsToLimit(); + } + } catch (e) { + if (!context.mounted) return; + showDismissibleSnackBar( + context, + content: Text(l10n.settings_error(e.toString())), + ); + setDialogState(() => saving = false); + return; + } + if (!context.mounted) return; + Navigator.pop(context); + }, child: Text(l10n.common_save), ), ], diff --git a/test/models/model_changes_test.dart b/test/models/model_changes_test.dart index fcac50bb..b96666e3 100644 --- a/test/models/model_changes_test.dart +++ b/test/models/model_changes_test.dart @@ -405,7 +405,7 @@ void main() { expect(settings.routeWeightSuccessIncrement, equals(0.5)); expect(settings.routeWeightFailureDecrement, equals(0.2)); expect(settings.maxMessageRetries, equals(5)); - expect(settings.evictDiscoveredContactsEnabled, isFalse); + expect(settings.evictDiscoveredContactsEnabled, isTrue); }); test('toJson includes all new fields', () { @@ -422,7 +422,7 @@ void main() { expect(json['route_weight_success_increment'], equals(0.5)); expect(json['route_weight_failure_decrement'], equals(0.2)); expect(json['max_message_retries'], equals(5)); - expect(json['evict_discovered_contacts_enabled'], isFalse); + expect(json['evict_discovered_contacts_enabled'], isTrue); }); test('fromJson reads all new fields', () { diff --git a/untranslated.json b/untranslated.json index 0d526645..9e26dfee 100644 --- a/untranslated.json +++ b/untranslated.json @@ -1,148 +1 @@ -{ - "bg": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "de": [ - "settings_publicKeyCopied", - "reaction_report" - ], - - "es": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "fr": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "hu": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "it": [ - "urlImage_enable", - "urlImage_possible", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "ja": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "ko": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "nl": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "pl": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "pt": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "ru": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "sk": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "sl": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "sv": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "uk": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ], - - "zh": [ - "urlImage_enable", - "urlImage_possible", - "settings_publicKeyCopied", - "reaction_report", - "contactsSettings_evictDiscoveredContactsTitle", - "contactsSettings_evictDiscoveredContactsSubtitle" - ] -} +{} \ No newline at end of file