mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Archive: Back out right away for main menu dirs
This commit is contained in:
@@ -147,13 +147,14 @@ int32_t archive_app(void* p) {
|
||||
if(path && !furi_string_empty(path)) {
|
||||
archive_set_tab(archive->browser, ArchiveTabBrowser);
|
||||
furi_string_set(archive->browser->path, path);
|
||||
archive->browser->is_root = false;
|
||||
archive->browser->is_root = true;
|
||||
archive_file_browser_set_path(
|
||||
archive->browser,
|
||||
archive->browser->path,
|
||||
archive_get_tab_ext(ArchiveTabBrowser),
|
||||
false,
|
||||
!momentum_settings.show_hidden_files);
|
||||
!momentum_settings.show_hidden_files,
|
||||
furi_string_get_cstr(path));
|
||||
}
|
||||
|
||||
scene_manager_next_scene(archive->scene_manager, ArchiveAppSceneBrowser);
|
||||
|
||||
@@ -121,7 +121,8 @@ void archive_file_browser_set_path(
|
||||
FuriString* path,
|
||||
const char* filter_ext,
|
||||
bool skip_assets,
|
||||
bool hide_dot_files) {
|
||||
bool hide_dot_files,
|
||||
const char* override_home_path) {
|
||||
furi_assert(browser);
|
||||
if(!browser->worker_running) {
|
||||
browser->worker =
|
||||
@@ -137,6 +138,7 @@ void archive_file_browser_set_path(
|
||||
file_browser_worker_set_config(
|
||||
browser->worker, path, filter_ext, skip_assets, hide_dot_files);
|
||||
}
|
||||
browser->override_home_path = override_home_path;
|
||||
}
|
||||
|
||||
bool archive_is_item_in_array(ArchiveBrowserViewModel* model, uint32_t idx) {
|
||||
@@ -385,7 +387,9 @@ bool archive_is_home(ArchiveBrowserView* browser) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const char* default_path = archive_get_default_path(archive_get_tab(browser));
|
||||
const char* default_path = browser->override_home_path ?
|
||||
browser->override_home_path :
|
||||
archive_get_default_path(archive_get_tab(browser));
|
||||
return furi_string_cmp_str(browser->path, default_path) == 0;
|
||||
}
|
||||
|
||||
@@ -589,7 +593,12 @@ void archive_switch_tab(ArchiveBrowserView* browser, InputKey key) {
|
||||
tab == ArchiveTabInternal ? false :
|
||||
!momentum_settings.show_hidden_files;
|
||||
archive_file_browser_set_path(
|
||||
browser, browser->path, archive_get_tab_ext(tab), skip_assets, hide_dot_files);
|
||||
browser,
|
||||
browser->path,
|
||||
archive_get_tab_ext(tab),
|
||||
skip_assets,
|
||||
hide_dot_files,
|
||||
NULL);
|
||||
tab_empty = false; // Empty check will be performed later
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,8 @@ void archive_file_browser_set_path(
|
||||
FuriString* path,
|
||||
const char* filter_ext,
|
||||
bool skip_assets,
|
||||
bool hide_dot_files);
|
||||
bool hide_dot_files,
|
||||
const char* override_home_path);
|
||||
bool archive_is_item_in_array(ArchiveBrowserViewModel* model, uint32_t idx);
|
||||
bool archive_is_file_list_load_required(ArchiveBrowserViewModel* model);
|
||||
void archive_update_offset(ArchiveBrowserView* browser);
|
||||
|
||||
@@ -95,6 +95,7 @@ struct ArchiveBrowserView {
|
||||
bool is_root;
|
||||
FuriTimer* scroll_timer;
|
||||
File* disk_image;
|
||||
const char* override_home_path;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user