[FL-3853] SubGhz: fix Missed the "Deleted" screen when deleting RAW Subghz (#3715)

This commit is contained in:
Skorpionm 2024-06-16 16:39:26 +04:00 committed by GitHub
parent ba014e873b
commit bda6d4f75a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 13 deletions

View file

@ -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);

View file

@ -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;
}
}

View file

@ -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 {