[FL-2491] File browser GUI module (#1237)
* File browser module and test app * nfc: Add support for saved files in subdirectories * nfc: Use helper function to get shadow path when loading data * File browser dialog integration pt.1 * File browser dialog integration pt.2 * Gui,Dialogs: drop file select * Correct use of dynamic string_t(string_ptr) Co-authored-by: Yukai Li <yukaili.geek@gmail.com> Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#include "assets_icons.h"
|
||||
#include "m-string.h"
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
|
||||
@@ -298,23 +300,23 @@ int32_t music_player_app(void* p) {
|
||||
if(p) {
|
||||
string_cat_str(file_path, p);
|
||||
} else {
|
||||
char file_name[256] = {0};
|
||||
string_set_str(file_path, MUSIC_PLAYER_APP_PATH_FOLDER);
|
||||
|
||||
DialogsApp* dialogs = furi_record_open("dialogs");
|
||||
bool res = dialog_file_select_show(
|
||||
bool res = dialog_file_browser_show(
|
||||
dialogs,
|
||||
MUSIC_PLAYER_APP_PATH_FOLDER,
|
||||
file_path,
|
||||
file_path,
|
||||
MUSIC_PLAYER_APP_EXTENSION,
|
||||
file_name,
|
||||
255,
|
||||
NULL);
|
||||
true,
|
||||
&I_music_10px,
|
||||
false);
|
||||
|
||||
furi_record_close("dialogs");
|
||||
if(!res) {
|
||||
FURI_LOG_E(TAG, "No file selected");
|
||||
break;
|
||||
}
|
||||
string_cat_str(file_path, MUSIC_PLAYER_APP_PATH_FOLDER);
|
||||
string_cat_str(file_path, "/");
|
||||
string_cat_str(file_path, file_name);
|
||||
}
|
||||
|
||||
if(!music_player_worker_load(music_player->worker, string_get_cstr(file_path))) {
|
||||
|
Reference in New Issue
Block a user