SettingsScreen: skip flash write if no settings changed

Track dirty state per-field in handleInput. savePrefs() on exit only
if at least one value was actually modified. Buzzer is excluded — it
already saves immediately via toggleBuzzer(). markClean() resets the
flag each time the settings screen is opened.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-13 21:09:47 +02:00
co-authored by Claude Sonnet 4.6
parent 4e83e99316
commit 60de6630fa
2 changed files with 22 additions and 13 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ public:
NodePrefs* getNodePrefs() const { return _node_prefs; }
uint16_t getBattMilliVolts() const { return _batt_mv > 0 ? _batt_mv : AbstractUITask::getBattMilliVolts(); }
void gotoHomeScreen() { setCurrScreen(home); }
void gotoSettingsScreen() { setCurrScreen(settings); }
void gotoSettingsScreen();
void gotoQuickMsgScreen();
void showAlert(const char* text, int duration_millis);
int getMsgCount() const { return _msgcount; }