Skip to content

Commit

Permalink
Removes error screen and fixes rename
Browse files Browse the repository at this point in the history
  • Loading branch information
acegoal07 committed Mar 2, 2024
1 parent 957b673 commit 9b57fe9
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 44 deletions.
2 changes: 0 additions & 2 deletions nfc_playlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ static NfcPlaylist* nfc_playlist_alloc() {
view_dispatcher_add_view(nfc_playlist->view_dispatcher, NfcPlaylistView_Popup, popup_get_view(nfc_playlist->popup));
view_dispatcher_add_view(nfc_playlist->view_dispatcher, NfcPlaylistView_FileSelect, file_browser_get_view(nfc_playlist->file_browser));
view_dispatcher_add_view(nfc_playlist->view_dispatcher, NfcPlaylistView_FileEdit, submenu_get_view(nfc_playlist->submenu));
view_dispatcher_add_view(nfc_playlist->view_dispatcher, NfcPlaylistView_FileExistsError, popup_get_view(nfc_playlist->popup));
view_dispatcher_add_view(nfc_playlist->view_dispatcher, NfcPlaylistView_TextInput, text_input_get_view(nfc_playlist->text_input));
return nfc_playlist;
}
Expand All @@ -90,7 +89,6 @@ static void nfc_playlist_free(NfcPlaylist* nfc_playlist) {
view_dispatcher_remove_view(nfc_playlist->view_dispatcher, NfcPlaylistView_Popup);
view_dispatcher_remove_view(nfc_playlist->view_dispatcher, NfcPlaylistView_FileSelect);
view_dispatcher_remove_view(nfc_playlist->view_dispatcher, NfcPlaylistView_FileEdit);
view_dispatcher_remove_view(nfc_playlist->view_dispatcher, NfcPlaylistView_FileExistsError);
view_dispatcher_remove_view(nfc_playlist->view_dispatcher, NfcPlaylistView_TextInput);
view_dispatcher_free(nfc_playlist->view_dispatcher);
variable_item_list_free(nfc_playlist->variable_item_list);
Expand Down
2 changes: 0 additions & 2 deletions nfc_playlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ typedef enum {
NfcPlaylistView_Popup,
NfcPlaylistView_FileSelect,
NfcPlaylistView_FileEdit,
NfcPlaylistView_FileExistsError,
NfcPlaylistView_TextInput
} NfcPlayScenesView;

Expand All @@ -30,7 +29,6 @@ typedef enum {
NfcPlaylistScene_EmulatingPopup,
NfcPlaylistScene_FileSelect,
NfcPlaylistScene_FileEdit,
NfcPlaylistScene_FileExistsError,
NfcPlaylistScene_TextInput,
NfcPlaylistScene_count
} NfcPlaylistScene;
Expand Down
1 change: 0 additions & 1 deletion nfc_playlist_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
#include "scences/emulation.h"
#include "scences/file_select.h"
#include "scences/file_edit.h"
#include "scences/file_exists_error.h"
#include "scences/text_input.h"
2 changes: 1 addition & 1 deletion scences/file_edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void nfc_playlist_file_edit_scene_on_enter(void* context) {
NfcPlaylistMenuSelection_RenamePlaylist,
nfc_playlist_file_edit_menu_callback,
nfc_playlist,
true,
!nfc_playlist->settings.file_selected_check,
"No\nplaylist\nselected");

view_dispatcher_switch_to_view(nfc_playlist->view_dispatcher, NfcPlaylistView_FileEdit);
Expand Down
25 changes: 0 additions & 25 deletions scences/file_exists_error.c

This file was deleted.

11 changes: 0 additions & 11 deletions scences/file_exists_error.h

This file was deleted.

2 changes: 0 additions & 2 deletions scences/text_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ void nfc_playlist_text_input_menu_callback(void* context) {
if (!storage_file_exists(storage, new_file_name)) {
storage_common_rename_safe(storage, furi_string_get_cstr(nfc_playlist->settings.file_path), new_file_name);
nfc_playlist->settings.file_path = furi_string_alloc_set_str(new_file_name);
} else {
scene_manager_next_scene(nfc_playlist->scene_manager, NfcPlaylistScene_FileExistsError);
}

free(new_file_name);
Expand Down

0 comments on commit 9b57fe9

Please sign in to comment.