From 0c85b8887335112483ff64a82a2a028e2c7bde6c Mon Sep 17 00:00:00 2001 From: Nikolay Minaylov Date: Thu, 5 May 2022 01:51:45 +0300 Subject: [PATCH] [FL-2512] Archive favourites fixes (#1195) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Archive favourites fixes * Archive: navigation history fix Co-authored-by: あく --- applications/archive/helpers/archive_browser.c | 4 ++-- applications/archive/scenes/archive_scene_browser.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/applications/archive/helpers/archive_browser.c b/applications/archive/helpers/archive_browser.c index b1e1e3ef..cbe57c06 100644 --- a/applications/archive/helpers/archive_browser.c +++ b/applications/archive/helpers/archive_browser.c @@ -80,6 +80,7 @@ void archive_set_item_count(ArchiveBrowserView* browser, uint32_t count) { model->item_idx = CLAMP(model->item_idx, model->item_cnt - 1, 0); return false; }); + archive_update_offset(browser); } void archive_file_array_rm_selected(ArchiveBrowserView* browser) { @@ -396,8 +397,6 @@ void archive_enter_dir(ArchiveBrowserView* browser, string_t name) { return; } - archive_dir_count_items(browser, string_get_cstr(name)); - if(string_cmp(browser->path, name) != 0) { with_view_model( browser->view, (ArchiveBrowserViewModel * model) { @@ -410,6 +409,7 @@ void archive_enter_dir(ArchiveBrowserView* browser, string_t name) { string_set(browser->path, name); } + archive_dir_count_items(browser, string_get_cstr(name)); archive_switch_dir(browser, string_get_cstr(browser->path)); } diff --git a/applications/archive/scenes/archive_scene_browser.c b/applications/archive/scenes/archive_scene_browser.c index bcfd63ba..0091bc99 100644 --- a/applications/archive/scenes/archive_scene_browser.c +++ b/applications/archive/scenes/archive_scene_browser.c @@ -95,6 +95,7 @@ bool archive_scene_browser_on_event(void* context, SceneManagerEvent event) { if(known_app) { archive_run_in_app(browser, selected); } + archive_show_file_menu(browser, false); consumed = true; break; case ArchiveBrowserEventFileMenuPin: