From a4c28ed5bf072154cab9b63c1fc914360c318cd5 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Sat, 11 Feb 2023 21:59:22 +0300 Subject: [PATCH] Show internal memory only in DEBUG mode + other fixes Remove unused imports and remove my old code that used to hide layouts and tmp history folders, this was removed in dev but somehow was added back here --- applications/main/archive/helpers/archive_browser.c | 8 ++++++++ applications/main/archive/helpers/archive_files.h | 1 - applications/services/gui/modules/file_browser.c | 1 - applications/services/gui/modules/file_browser_worker.c | 6 +----- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/applications/main/archive/helpers/archive_browser.c b/applications/main/archive/helpers/archive_browser.c index 3163b8cff..97c68545e 100644 --- a/applications/main/archive/helpers/archive_browser.c +++ b/applications/main/archive/helpers/archive_browser.c @@ -8,6 +8,7 @@ #include #include #include +#include static void archive_folder_open_cb(void* context, uint32_t item_cnt, int32_t file_idx, bool is_root) { @@ -462,6 +463,13 @@ void archive_switch_tab(ArchiveBrowserView* browser, InputKey key) { } else { tab = (tab + 1) % ArchiveTabTotal; } + if(tab == ArchiveTabInternal && !furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) { + if(key == InputKeyLeft) { + tab = ((tab - 1) + ArchiveTabTotal) % ArchiveTabTotal; + } else { + tab = (tab + 1) % ArchiveTabTotal; + } + } browser->is_root = true; archive_set_tab(browser, tab); diff --git a/applications/main/archive/helpers/archive_files.h b/applications/main/archive/helpers/archive_files.h index 27f6353a7..6acdb2213 100644 --- a/applications/main/archive/helpers/archive_files.h +++ b/applications/main/archive/helpers/archive_files.h @@ -3,7 +3,6 @@ #include #include #include -#include #include #include "toolbox/path.h" diff --git a/applications/services/gui/modules/file_browser.c b/applications/services/gui/modules/file_browser.c index bcd266d0e..dba39bf24 100644 --- a/applications/services/gui/modules/file_browser.c +++ b/applications/services/gui/modules/file_browser.c @@ -11,7 +11,6 @@ #include #include #include -#include "m-string.h" #include "m-algo.h" #include diff --git a/applications/services/gui/modules/file_browser_worker.c b/applications/services/gui/modules/file_browser_worker.c index 4453b6d9f..4b7be70a1 100644 --- a/applications/services/gui/modules/file_browser_worker.c +++ b/applications/services/gui/modules/file_browser_worker.c @@ -15,8 +15,6 @@ #define TAG "BrowserWorker" #define ASSETS_DIR "assets" -#define BADUSB_LAYOUTS_DIR "layouts" -#define SUBGHZ_TEMP_DIR "tmp_history" #define BROWSER_ROOT STORAGE_ANY_PATH_PREFIX #define FILE_NAME_LEN_MAX 256 #define LONG_LOAD_THRESHOLD 100 @@ -92,9 +90,7 @@ static bool browser_filter_by_name(BrowserWorker* browser, FuriString* name, boo if(is_folder) { // Skip assets folders (if enabled) if(browser->skip_assets) { - return ((furi_string_cmp_str(name, ASSETS_DIR) == 0) ? (false) : (true)) && - ((furi_string_cmp_str(name, BADUSB_LAYOUTS_DIR) == 0) ? (false) : (true)) && - ((furi_string_cmp_str(name, SUBGHZ_TEMP_DIR) == 0) ? (false) : (true)); + return ((furi_string_cmp_str(name, ASSETS_DIR) == 0) ? (false) : (true)); } else { return true; }