Merge pull request #516 from Hacuchino-hash/contacts-full-warning
Warn when the node reports contact storage is full
This commit is contained in:
23 files changed
+124
No files matched your search
@@ -4740,6 +4740,9 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
case respCodeEndOfContacts:
|
||||
debugPrint('Got END_OF_CONTACTS');
|
||||
_isLoadingContacts = false;
|
||||
if (_contactsStorageFull && _contacts.length < _maxContacts) {
|
||||
_contactsStorageFull = false; // capacity freed up since the warning
|
||||
}
|
||||
_hasLoadedContacts = true;
|
||||
_preserveContactsOnRefresh = false;
|
||||
_contactSyncUsesSinceFilter = false;
|
||||
|
||||
@@ -559,6 +559,7 @@
|
||||
},
|
||||
"contacts_noUnreadContacts": "No unread contacts",
|
||||
"contacts_noContactsFound": "No contacts or groups found",
|
||||
"contacts_storageFull": "Contact storage on the node is full. New nodes cannot be added until contacts are removed.",
|
||||
"contacts_deleteContact": "Delete Contact",
|
||||
"contacts_removeConfirm": "Remove {contactName} from contacts?",
|
||||
"@contacts_removeConfirm": {
|
||||
|
||||
@@ -2188,6 +2188,12 @@ abstract class AppLocalizations {
|
||||
/// **'No contacts or groups found'**
|
||||
String get contacts_noContactsFound;
|
||||
|
||||
/// No description provided for @contacts_storageFull.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Contact storage on the node is full. New nodes cannot be added until contacts are removed.'**
|
||||
String get contacts_storageFull;
|
||||
|
||||
/// No description provided for @contacts_deleteContact.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
||||
@@ -1205,6 +1205,10 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get contacts_noContactsFound => 'Няма намерени контакти или групи.';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Изтрий Контакт';
|
||||
|
||||
|
||||
@@ -1200,6 +1200,10 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
String get contacts_noContactsFound =>
|
||||
'Keine Kontakte oder Gruppen gefunden.';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Kontakt löschen';
|
||||
|
||||
|
||||
@@ -1182,6 +1182,10 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get contacts_noContactsFound => 'No contacts or groups found';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Delete Contact';
|
||||
|
||||
|
||||
@@ -1197,6 +1197,10 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
String get contacts_noContactsFound =>
|
||||
'No se encontraron contactos ni grupos.';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Eliminar contacto';
|
||||
|
||||
|
||||
@@ -1202,6 +1202,10 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get contacts_noContactsFound => 'Aucun contact ou groupe trouvé.';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Supprimer le contact';
|
||||
|
||||
|
||||
@@ -1193,6 +1193,10 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
@override
|
||||
String get contacts_noContactsFound => 'Nem található névjegy vagy csoport';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Névjegy törlése';
|
||||
|
||||
|
||||
@@ -1201,6 +1201,10 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get contacts_noContactsFound => 'Nessun contatto o gruppo trovato.';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Elimina Contatto';
|
||||
|
||||
|
||||
@@ -1138,6 +1138,10 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
@override
|
||||
String get contacts_noContactsFound => '連絡先またはグループは見つかりませんでした。';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => '連絡先を削除';
|
||||
|
||||
|
||||
@@ -1142,6 +1142,10 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
@override
|
||||
String get contacts_noContactsFound => '연락처 또는 그룹이 검색되지 않았습니다.';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => '연락처 삭제';
|
||||
|
||||
|
||||
@@ -1192,6 +1192,10 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get contacts_noContactsFound => 'Geen contacten of groepen gevonden.';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Verwijder Contact';
|
||||
|
||||
|
||||
@@ -1210,6 +1210,10 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
String get contacts_noContactsFound =>
|
||||
'Brak znalezionych kontaktów ani grup.';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Usuń Kontakt';
|
||||
|
||||
|
||||
@@ -1199,6 +1199,10 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
String get contacts_noContactsFound =>
|
||||
'Não foram encontrados contatos ou grupos.';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Excluir Contato';
|
||||
|
||||
|
||||
@@ -1203,6 +1203,10 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get contacts_noContactsFound => 'Контакты или группы не найдены';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Удалить контакт';
|
||||
|
||||
|
||||
@@ -1188,6 +1188,10 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
String get contacts_noContactsFound =>
|
||||
'Neboli nájdených žiadnych kontaktov ani skupiny.';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Odstrániť kontakt';
|
||||
|
||||
|
||||
@@ -1188,6 +1188,10 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get contacts_noContactsFound => 'Stiki niso najdeni.';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Izbriši stik';
|
||||
|
||||
|
||||
@@ -1182,6 +1182,10 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
String get contacts_noContactsFound =>
|
||||
'Inga kontakter eller grupper hittades.';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Ta bort Kontakt';
|
||||
|
||||
|
||||
@@ -1194,6 +1194,10 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get contacts_noContactsFound => 'Контактів або груп не знайдено.';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => 'Видалити контакт';
|
||||
|
||||
|
||||
@@ -1124,6 +1124,10 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get contacts_noContactsFound => '未找到任何联系人或群聊';
|
||||
|
||||
@override
|
||||
String get contacts_storageFull =>
|
||||
'Contact storage on the node is full. New nodes cannot be added until contacts are removed.';
|
||||
|
||||
@override
|
||||
String get contacts_deleteContact => '删除联系人';
|
||||
|
||||
|
||||
@@ -919,6 +919,31 @@ class _ContactsScreenState extends State<ContactsScreen>
|
||||
],
|
||||
),
|
||||
),
|
||||
if (connector.contactsStorageFull)
|
||||
Container(
|
||||
width: double.infinity,
|
||||
color: Theme.of(context).colorScheme.errorContainer,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.warning_amber_rounded,
|
||||
size: 18,
|
||||
color: Theme.of(context).colorScheme.onErrorContainer,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Text(
|
||||
context.l10n.contacts_storageFull,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Theme.of(context).colorScheme.onErrorContainer,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
dense: true,
|
||||
leading: const Icon(Icons.person_add_rounded),
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -106,6 +107,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -187,6 +189,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -268,6 +271,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -349,6 +353,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -430,6 +435,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -506,6 +512,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -587,6 +594,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -668,6 +676,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -749,6 +758,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -830,6 +840,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -911,6 +922,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -992,6 +1004,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -1073,6 +1086,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -1154,6 +1168,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -1235,6 +1250,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
@@ -1316,6 +1332,7 @@
|
||||
"appSettings_channelMinHopsRetries",
|
||||
"appSettings_batteryOptimization",
|
||||
"appSettings_batteryOptimizationSubtitle",
|
||||
"contacts_storageFull",
|
||||
"contacts_removeFromContacts",
|
||||
"contacts_removeFromContactsConfirm",
|
||||
"contacts_keepChatHistory",
|
||||
|
||||
Reference in new issue
Block a user