mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-04-20 22:13:48 +00:00
Persist Discovered Contacts when updated
This commit is contained in:
parent
38856c67e5
commit
a0efbbe4bd
1 changed files with 2 additions and 1 deletions
|
|
@ -4051,7 +4051,7 @@ class MeshCoreConnector extends ChangeNotifier {
|
|||
Uint8List rawPacket, {
|
||||
bool noNotify = false,
|
||||
}) {
|
||||
debugPrint('Discovered new contact: ${contact.name}');
|
||||
appLogger.info('Discovered new contact: ${contact.name}', tag: 'Connector');
|
||||
|
||||
final existingIndex = _discoveredContacts.indexWhere(
|
||||
(c) => c.publicKeyHex == contact.publicKeyHex,
|
||||
|
|
@ -4071,6 +4071,7 @@ class MeshCoreConnector extends ChangeNotifier {
|
|||
lastSeen: contact.lastSeen,
|
||||
);
|
||||
notifyListeners();
|
||||
unawaited(_persistDiscoveredContacts());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue