Skip to content

Commit

Permalink
Move changeBleName to callback function for reset default
Browse files Browse the repository at this point in the history
  • Loading branch information
deXol committed May 22, 2022
1 parent d8d5e9f commit 6d0fac3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/MPDeviceBleImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1861,8 +1861,17 @@ bool MPDeviceBleImpl::resetDefaultSettings()
bleSettings->resetDefaultSettings();
if (get_bundleVersion() >= SET_BLE_NAME_BUNDLE_VERSION)
{
setBleName(DEFAULT_BLE_NAME, [](bool){});
emit changeBleName(DEFAULT_BLE_NAME);
setBleName(DEFAULT_BLE_NAME, [this](bool success)
{
if (success)
{
emit changeBleName(DEFAULT_BLE_NAME);
}
else
{
qCritical() << "Setting default Device Bluetooth Name failed";
}
});
}
return true;
}
Expand Down

0 comments on commit 6d0fac3

Please sign in to comment.