Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion examples/companion_radio/MyMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,11 @@ void MyMesh::onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path
memcpy(p->path, path, p->path_len);
}

if (!is_new) dirty_contacts_expiry = futureMillis(LAZY_CONTACTS_WRITE_DELAY); // only schedule lazy write for contacts that are in contacts[]
// Don't save if this is a new contact but auto-add is off (contact not added to list)
if (is_new && !isAutoAddEnabled()) {
return;
}
dirty_contacts_expiry = futureMillis(LAZY_CONTACTS_WRITE_DELAY);
}

static int sort_by_recent(const void *a, const void *b) {
Expand Down