Fix setting defaults for stealing focus and block countdown
This commit is contained in:
parent
08929eb552
commit
a8baa085c7
4 changed files with 6 additions and 6 deletions
|
@ -177,7 +177,7 @@ void onWebsocketBlockMessage(esp_websocket_event_data_t *event_data)
|
|||
// xTaskNotifyGive(blockUpdateTaskHandle);
|
||||
|
||||
if (getCurrentScreen() != SCREEN_BLOCK_HEIGHT &&
|
||||
preferences.getBool("stealFocus", true))
|
||||
preferences.getBool("stealFocus", false))
|
||||
{
|
||||
uint64_t timerPeriod = 0;
|
||||
if (isTimerActive())
|
||||
|
|
|
@ -57,7 +57,7 @@ void workerTask(void *pvParameters) {
|
|||
if (getCurrentScreen() != SCREEN_HALVING_COUNTDOWN) {
|
||||
taskEpdContent = parseBlockHeight(getBlockHeight());
|
||||
} else {
|
||||
taskEpdContent = parseHalvingCountdown(getBlockHeight(), preferences.getBool("useBlkCountdown", false));
|
||||
taskEpdContent = parseHalvingCountdown(getBlockHeight(), preferences.getBool("useBlkCountdown", true));
|
||||
}
|
||||
|
||||
if (getCurrentScreen() == SCREEN_HALVING_COUNTDOWN ||
|
||||
|
|
|
@ -569,7 +569,7 @@ void onApiSettingsGet(AsyncWebServerRequest *request)
|
|||
root["otaEnabled"] = preferences.getBool("otaEnabled", true);
|
||||
root["fetchEurPrice"] = preferences.getBool("fetchEurPrice", false);
|
||||
root["useSatsSymbol"] = preferences.getBool("useSatsSymbol", false);
|
||||
root["useBlkCountdown"] = preferences.getBool("useBlkCountdown", false);
|
||||
root["useBlkCountdown"] = preferences.getBool("useBlkCountdown", true);
|
||||
root["suffixPrice"] = preferences.getBool("suffixPrice", false);
|
||||
root["disableLeds"] = preferences.getBool("disableLeds", false);
|
||||
|
||||
|
@ -749,10 +749,10 @@ void onApiSettingsPost(AsyncWebServerRequest *request)
|
|||
settingsChanged = true;
|
||||
}
|
||||
|
||||
if (request->hasParam("stealFocusOnBlock", true))
|
||||
if (request->hasParam("stealFocus", false))
|
||||
{
|
||||
AsyncWebParameter *stealFocusOnBlock =
|
||||
request->getParam("stealFocusOnBlock", true);
|
||||
request->getParam("stealFocus", false);
|
||||
|
||||
preferences.putBool("stealFocus", stealFocusOnBlock->value().toInt());
|
||||
settingsChanged = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue