Fix setting defaults for stealing focus and block countdown

This commit is contained in:
Djuri Baars 2024-06-09 11:31:25 +02:00
parent 08929eb552
commit a8baa085c7
4 changed files with 6 additions and 6 deletions

2
data

@ -1 +1 @@
Subproject commit 5b3a0712847d292d1aefcf8eb2b1062a24556fb2
Subproject commit 2b2c8e7fc72a4e0108caf63bccb2e8bf0a5f21a0

View file

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

View file

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

View file

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