@@ -62,7 +62,7 @@ int32_t nfc_playlist_emulation_task(void* context) {
62
62
popup_set_context (nfc_playlist -> popup , nfc_playlist );
63
63
view_dispatcher_switch_to_view (nfc_playlist -> view_dispatcher , NfcPlaylistView_Popup );
64
64
65
- if (file_stream_open (stream , furi_string_get_cstr (nfc_playlist -> file_path ), FSAM_READ , FSOM_OPEN_EXISTING )) {
65
+ if (file_stream_open (stream , furi_string_get_cstr (nfc_playlist -> file_path ), FSAM_READ , FSOM_OPEN_EXISTING ) && nfc_playlist -> file_selected ) {
66
66
EmulationState = NfcPlaylistEmulationState_Emulating ;
67
67
int file_position = 0 ;
68
68
while (stream_read_line (stream , line ) && EmulationState == NfcPlaylistEmulationState_Emulating ) {
@@ -144,7 +144,14 @@ int32_t nfc_playlist_emulation_task(void* context) {
144
144
popup_set_text (nfc_playlist -> popup , "Press back" , 64 , 50 , AlignCenter , AlignTop );
145
145
stop_blink (nfc_playlist );
146
146
EmulationState = NfcPlaylistEmulationState_Stopped ;
147
- } else {
147
+ }
148
+
149
+ else if (!nfc_playlist -> file_selected ) {
150
+ popup_set_header (nfc_playlist -> popup , "No playlist selected" , 64 , 10 , AlignCenter , AlignTop );
151
+ popup_set_text (nfc_playlist -> popup , "Press back" , 64 , 50 , AlignCenter , AlignTop );
152
+ }
153
+
154
+ else {
148
155
popup_set_header (nfc_playlist -> popup , "Failed to open playlist" , 64 , 10 , AlignCenter , AlignTop );
149
156
popup_set_text (nfc_playlist -> popup , "Press back" , 64 , 50 , AlignCenter , AlignTop );
150
157
}
0 commit comments