Commit 5d22b101 authored by natalie's avatar natalie 💜
Browse files

Improve SD card hotswap support

parent ff5d20f3
......@@ -87,7 +87,6 @@ static void file_error(bool writing) {
} else {
modal_show_simple(TAG, "SD Card Error", "There was an error writing to the SD card.\nPlease check that the card is inserted and has free space.", LV_SYMBOL_OK " OK");
}
Ui_FileBrowser_Reset();
Ui_Screen = UISCREEN_MAINMENU;
Sdcard_Online = false;
ESP_LOGE(TAG, "IO error");
......@@ -294,6 +293,7 @@ static bool loadhistory() {
}
void Ui_FileBrowser_Setup() {
Ui_FileBrowser_Reset();
if (loadhistory()) {
selectedfile_last = selectedfile;
//nothing more to do
......
......@@ -214,7 +214,7 @@ void Ui_MainMenu_Key(KeyEvent_t event) {
return false;
}
//card is back up
Ui_FileBrowser_Reset(); //could be a new card
Ui_FileBrowser_Setup(); //could be a new card
OptionsMgr_Touch(); //queue an options save, to get everything written to the new card
}
Ui_Screen = mm_icontable[mm_curicon].newscreen;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment