acegoal07 1 год назад
Родитель
Сommit
27d8ffb395

+ 1 - 0
nfc_playlist.h

@@ -31,6 +31,7 @@
 
 #define PLAYLIST_LOCATION "/ext/apps_data/nfc_playlist/"
 #define PLAYLIST_DIR "/ext/apps_data/nfc_playlist"
+#define NFC_ITEM_LOCATION "/ext/nfc/"
 #define MAX_PLAYLIST_NAME_LEN 50
 
 typedef enum {

+ 4 - 1
scenes/nfc_playlist_scene_confirm_delete.c

@@ -39,8 +39,11 @@ bool nfc_playlist_confirm_delete_scene_on_event(void* context, SceneManagerEvent
             scene_manager_search_and_switch_to_previous_scene(nfc_playlist->scene_manager, NfcPlaylistScene_MainMenu);
             consumed = true;
             break;
-         default:
+         case GuiButtonTypeLeft:
             scene_manager_previous_scene(nfc_playlist->scene_manager);
+            consumed = true;
+            break;
+         default:
             break;
       }
    }

+ 1 - 1
scenes/nfc_playlist_scene_name_new_playlist.c

@@ -3,7 +3,7 @@
 int32_t nfc_playlist_name_new_playlist_thread_task(void* context) {
    NfcPlaylist* nfc_playlist = context;
 
-   FuriString* file_name = furi_string_alloc_printf("/ext/apps_data/nfc_playlist/%s.txt", nfc_playlist->text_input_output);
+   FuriString* file_name = furi_string_alloc_printf("%s%s.txt", PLAYLIST_LOCATION, nfc_playlist->text_input_output);
    char const* file_name_cstr = furi_string_get_cstr(file_name);
 
    Storage* storage = furi_record_open(RECORD_STORAGE);

+ 2 - 2
scenes/nfc_playlist_scene_nfc_add.c

@@ -39,13 +39,13 @@ void nfc_playlist_nfc_add_scene_on_enter(void* context) {
    file_browser_configure(
       nfc_playlist->file_browser,
       ".nfc",
-      "/ext/nfc/",
+      NFC_ITEM_LOCATION,
       true,
       true,
       &I_Nfc_10px,
       true);
    file_browser_set_callback(nfc_playlist->file_browser, nfc_playlist_nfc_add_menu_callback, nfc_playlist);
-   FuriString* tmp_str = furi_string_alloc_set_str("/ext/nfc/");
+   FuriString* tmp_str = furi_string_alloc_set_str(NFC_ITEM_LOCATION);
    file_browser_start(nfc_playlist->file_browser, tmp_str);
    furi_string_free(tmp_str);