mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
File Browser: Fix race condition for switch folder and refresh --nobuild
Fixes: In archive, delete last item in folder, tab auto switch, but wrong folder path is shown for new selected tab
This commit is contained in:
@@ -59,7 +59,8 @@
|
||||
### Fixed:
|
||||
- GUI:
|
||||
- Fix Dark Mode after XOR canvas color, like in NFC dict attack (by @Willy-JL)
|
||||
- OFW: Make file extensions case-insensitive (by @gsurkov))
|
||||
- OFW: Make file extensions case-insensitive (by @gsurkov)
|
||||
- File Browser: Fix race condition for switch folder and refresh (by @Willy-JL)
|
||||
- NFC:
|
||||
- OFW: Fix plantain balance string (by @Astrrra)
|
||||
- OFW: Now fifo size in ST25 chip is calculated properly (by @RebornedBrain)
|
||||
|
||||
@@ -56,6 +56,7 @@ struct BrowserWorker {
|
||||
BrowserWorkerLongLoadCallback long_load_cb;
|
||||
|
||||
bool keep_selection;
|
||||
FuriString* select_next;
|
||||
FuriString* passed_ext_filter;
|
||||
};
|
||||
|
||||
@@ -452,7 +453,7 @@ static int32_t browser_worker(void* context) {
|
||||
}
|
||||
|
||||
if(flags & WorkerEvtFolderRefresh) {
|
||||
furi_string_set(filename, browser->path_next);
|
||||
furi_string_set(filename, browser->select_next);
|
||||
|
||||
bool is_root = browser_folder_check_and_switch(path);
|
||||
|
||||
@@ -505,6 +506,7 @@ BrowserWorker* file_browser_worker_alloc(
|
||||
|
||||
browser_parse_ext_filter(browser->ext_filter, ext_filter);
|
||||
browser->passed_ext_filter = furi_string_alloc_set(ext_filter);
|
||||
browser->select_next = furi_string_alloc();
|
||||
browser->skip_assets = skip_assets;
|
||||
browser->hide_dot_files = hide_dot_files;
|
||||
|
||||
@@ -533,6 +535,7 @@ void file_browser_worker_free(BrowserWorker* browser) {
|
||||
furi_string_free(browser->path_current);
|
||||
furi_string_free(browser->path_start);
|
||||
furi_string_free(browser->passed_ext_filter);
|
||||
furi_string_free(browser->select_next);
|
||||
|
||||
ExtFilterArray_clear(browser->ext_filter);
|
||||
|
||||
@@ -625,9 +628,9 @@ void file_browser_worker_folder_exit(BrowserWorker* browser) {
|
||||
void file_browser_worker_folder_refresh_sel(BrowserWorker* browser, const char* item_name) {
|
||||
furi_check(browser);
|
||||
if(item_name != NULL) {
|
||||
furi_string_set(browser->path_next, item_name);
|
||||
furi_string_set(browser->select_next, item_name);
|
||||
} else {
|
||||
furi_string_reset(browser->path_next);
|
||||
furi_string_reset(browser->select_next);
|
||||
}
|
||||
furi_thread_flags_set(furi_thread_get_id(browser->thread), WorkerEvtFolderRefresh);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user