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

This commit is contained in:
geeksville
2020-09-16 09:08:35 -07:00
parent f847e30a3c
commit 8c240b59f6
2 changed files with 8 additions and 1 deletions

View File

@@ -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