Enforce "show hidden files" in browser worker

This commit is contained in:
Willy-JL
2024-03-21 03:02:13 +00:00
parent cee0a223fc
commit 513c6b8732
3 changed files with 4 additions and 5 deletions
@@ -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
@@ -7,6 +7,7 @@
#include <core/check.h>
#include <core/common_defines.h>
#include <furi.h>
#include <momentum/momentum.h>
#include <m-array.h>
#include <stdbool.h>
@@ -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;
}
@@ -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,