fix #393. immediately save node db to disk if user changes name

1.2-legacy
geeksville 2020-09-16 09:08:35 -07:00
rodzic f847e30a3c
commit 8c240b59f6
2 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -206,6 +206,13 @@ void MeshService::reloadConfig()
nodeDB.saveToDisk();
}
/// The owner User record just got updated, update our node DB and broadcast the info into the mesh
void MeshService::reloadOwner()
{
sendOurOwner();
nodeDB.saveToDisk();
}
/**
* Given a ToRadio buffer parse it and properly handle it (setup radio, owner or send packet into the mesh)
* Called by PhoneAPI.handleToRadio. Note: p is a scratch buffer, this function is allowed to write to it but it can not keep a

Wyświetl plik

@ -67,7 +67,7 @@ class MeshService
void reloadConfig();
/// The owner User record just got updated, update our node DB and broadcast the info into the mesh
void reloadOwner() { sendOurOwner(); }
void reloadOwner();
/// Called when the user wakes up our GUI, normally sends our latest location to the mesh (if we have it), otherwise at least
/// sends our owner