mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-11-29 22:49:55 +03:00
[FL-3853] SubGhz: fix Missed the "Deleted" screen when deleting RAW Subghz
This commit is contained in:
parent
ba014e873b
commit
cdc7e36d5c
@ -58,13 +58,7 @@ bool subghz_scene_delete_raw_on_event(void* context, SceneManagerEvent event) {
|
||||
if(event.event == SubGhzCustomEventSceneDeleteRAW) {
|
||||
furi_string_set(subghz->file_path_tmp, subghz->file_path);
|
||||
if(subghz_delete_file(subghz)) {
|
||||
if(subghz_rx_key_state_get(subghz) != SubGhzRxKeyStateRAWLoad) {
|
||||
subghz_rx_key_state_set(subghz, SubGhzRxKeyStateIDLE);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneDeleteSuccess);
|
||||
} else {
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaved);
|
||||
}
|
||||
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneDeleteSuccess);
|
||||
} else {
|
||||
scene_manager_search_and_switch_to_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneStart);
|
||||
|
@ -26,14 +26,24 @@ bool subghz_scene_delete_success_on_event(void* context, SceneManagerEvent event
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubGhzCustomEventSceneDeleteSuccess) {
|
||||
if(scene_manager_search_and_switch_to_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneReadRAW)) {
|
||||
} else if(scene_manager_search_and_switch_to_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneSaved)) {
|
||||
if(subghz_rx_key_state_get(subghz) == SubGhzRxKeyStateRAWLoad) {
|
||||
if(scene_manager_search_and_switch_to_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneSaved)) {
|
||||
} else {
|
||||
scene_manager_search_and_switch_to_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneStart);
|
||||
}
|
||||
} else {
|
||||
scene_manager_search_and_switch_to_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneStart);
|
||||
subghz_rx_key_state_set(subghz, SubGhzRxKeyStateIDLE);
|
||||
|
||||
if(scene_manager_search_and_switch_to_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneReadRAW)) {
|
||||
} else {
|
||||
scene_manager_search_and_switch_to_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneStart);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ void subghz_scene_saved_on_enter(void* context) {
|
||||
subghz_rx_key_state_set(subghz, SubGhzRxKeyStateRAWLoad);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneReadRAW);
|
||||
} else {
|
||||
subghz_rx_key_state_set(subghz, SubGhzRxKeyStateRAWLoad);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSavedMenu);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user