From 513c6b873280697bfe460c43b781631b4cc8d10a Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Thu, 21 Mar 2024 03:02:13 +0000 Subject: [PATCH] Enforce "show hidden files" in browser worker --- applications/main/archive/helpers/archive_browser.c | 4 +--- applications/services/gui/modules/file_browser_worker.c | 3 ++- .../scenes/desktop_settings_scene_keybinds_action_type.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/applications/main/archive/helpers/archive_browser.c b/applications/main/archive/helpers/archive_browser.c index dd9a323eb6..6ad41a2a4c 100644 --- a/applications/main/archive/helpers/archive_browser.c +++ b/applications/main/archive/helpers/archive_browser.c @@ -585,9 +585,7 @@ void archive_switch_tab(ArchiveBrowserView* browser, InputKey key) { bool is_browser = !strcmp(archive_get_tab_ext(tab), "*"); bool skip_assets = !is_browser; // Hide dot files everywhere except Browser if in debug mode - bool hide_dot_files = !is_browser ? true : - tab == ArchiveTabInternal ? false : - !momentum_settings.show_hidden_files; + bool hide_dot_files = !is_browser ? true : tab == ArchiveTabInternal ? false : true; archive_file_browser_set_path( browser, browser->path, archive_get_tab_ext(tab), skip_assets, hide_dot_files); tab_empty = false; // Empty check will be performed later diff --git a/applications/services/gui/modules/file_browser_worker.c b/applications/services/gui/modules/file_browser_worker.c index 366d5f9ca9..fc894a3b5f 100644 --- a/applications/services/gui/modules/file_browser_worker.c +++ b/applications/services/gui/modules/file_browser_worker.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -111,7 +112,7 @@ static void browser_parse_ext_filter(ExtFilterArray_t ext_filter, const char* fi static bool browser_filter_by_name(BrowserWorker* browser, FuriString* name, bool is_folder) { // Skip dot files if enabled - if(browser->hide_dot_files) { + if(browser->hide_dot_files && !momentum_settings.show_hidden_files) { if(furi_string_start_with_str(name, ".")) { return false; } diff --git a/applications/settings/desktop_settings/scenes/desktop_settings_scene_keybinds_action_type.c b/applications/settings/desktop_settings/scenes/desktop_settings_scene_keybinds_action_type.c index 3de7de5461..d0e8ac74d8 100644 --- a/applications/settings/desktop_settings/scenes/desktop_settings_scene_keybinds_action_type.c +++ b/applications/settings/desktop_settings/scenes/desktop_settings_scene_keybinds_action_type.c @@ -47,7 +47,7 @@ static void const DialogsFileBrowserOptions browser_options = { .extension = extension, .icon = &I_unknown_10px, - .hide_dot_files = !momentum_settings.show_hidden_files, + .hide_dot_files = true, .skip_assets = true, .hide_ext = hide_ext, .item_loader_callback = keybinds_fap_selector_item_callback,