Open File Browser on Media Insert (option) (#20151)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Thomas Niccolo Reyes
2020-11-18 12:30:32 +08:00
committed by GitHub
parent 5768ee0f9e
commit ecd8227de0
9 changed files with 25 additions and 16 deletions

View File

@@ -104,6 +104,8 @@ class MenuItem_sdfolder : public MenuItem_sdbase {
}
};
extern uint8_t screen_history_depth;
void menu_media() {
ui.encoder_direction_menus();
@@ -115,7 +117,7 @@ void menu_media() {
#endif
START_MENU();
BACK_ITEM(MSG_MAIN);
BACK_ITEM_P(TERN1(BROWSE_MEDIA_ON_INSERT, screen_history_depth) ? GET_TEXT(MSG_MAIN) : GET_TEXT(MSG_BACK));
if (card.flag.workDirIsRoot) {
#if !PIN_EXISTS(SD_DETECT)
ACTION_ITEM(MSG_REFRESH, []{ encoderTopLine = 0; card.mount(); });