Skip to content

Commit 7135b02

Browse files
committed
Enforce "show hidden files" in dialogs and not archive
Archive "file" tabs (like SubGHz and so on) hide dot files Archive "browser" tabs (like /ext) follow user choice Dialogs (everything else) follow dev choice, unless user chose to show hidden files
1 parent 44155eb commit 7135b02

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

applications/main/archive/helpers/archive_browser.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,9 @@ void archive_switch_tab(ArchiveBrowserView* browser, InputKey key) {
585585
bool is_browser = !strcmp(archive_get_tab_ext(tab), "*");
586586
bool skip_assets = !is_browser;
587587
// Hide dot files everywhere except Browser if in debug mode
588-
bool hide_dot_files = !is_browser ? true : tab == ArchiveTabInternal ? false : true;
588+
bool hide_dot_files = !is_browser ? true :
589+
tab == ArchiveTabInternal ? false :
590+
!momentum_settings.show_hidden_files;
589591
archive_file_browser_set_path(
590592
browser, browser->path, archive_get_tab_ext(tab), skip_assets, hide_dot_files);
591593
tab_empty = false; // Empty check will be performed later

applications/services/dialogs/dialogs_api.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <toolbox/api_lock.h>
44
#include <assets_icons.h>
55
#include <storage/storage.h>
6+
#include <momentum/momentum.h>
67

78
/****************** File browser ******************/
89

@@ -37,7 +38,8 @@ bool dialog_file_browser_show(
3738
.file_icon = options ? options->icon : NULL,
3839
.hide_ext = options ? options->hide_ext : true,
3940
.skip_assets = options ? options->skip_assets : true,
40-
.hide_dot_files = options ? options->hide_dot_files : true,
41+
.hide_dot_files =
42+
(options ? options->hide_dot_files : true && !momentum_settings.show_hidden_files),
4143
.preselected_filename = path,
4244
.item_callback = options ? options->item_loader_callback : NULL,
4345
.item_callback_context = options ? options->item_loader_context : NULL,

applications/services/gui/modules/file_browser_worker.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <core/check.h>
88
#include <core/common_defines.h>
99
#include <furi.h>
10-
#include <momentum/momentum.h>
1110

1211
#include <m-array.h>
1312
#include <stdbool.h>
@@ -112,7 +111,7 @@ static void browser_parse_ext_filter(ExtFilterArray_t ext_filter, const char* fi
112111

113112
static bool browser_filter_by_name(BrowserWorker* browser, FuriString* name, bool is_folder) {
114113
// Skip dot files if enabled
115-
if(browser->hide_dot_files && !momentum_settings.show_hidden_files) {
114+
if(browser->hide_dot_files) {
116115
if(furi_string_start_with_str(name, ".")) {
117116
return false;
118117
}

0 commit comments

Comments
 (0)