[FL-2512] Archive favourites fixes (#1195)

* Archive favourites fixes
* Archive: navigation history fix

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Nikolay Minaylov 2022-05-05 01:51:45 +03:00 committed by GitHub
parent c5c0d2e8bc
commit 0c85b88873
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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));
}

View File

@ -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: