[FL-2717] Fix unexpected behaviour when opening a remote from outside (#1538)
* Fix unexpected behaviour when opening remote from outside * Same fix for editing button name * Exit application correctly if remote was deleted * Remove duplicate function from ibutton * Use COUNT_OF macro Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -29,7 +29,10 @@ bool infrared_scene_learn_done_on_event(void* context, SceneManagerEvent event)
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == InfraredCustomEventTypePopupClosed) {
|
||||
scene_manager_next_scene(infrared->scene_manager, InfraredSceneRemote);
|
||||
if(!scene_manager_search_and_switch_to_previous_scene(
|
||||
infrared->scene_manager, InfraredSceneRemote)) {
|
||||
scene_manager_next_scene(infrared->scene_manager, InfraredSceneRemote);
|
||||
}
|
||||
consumed = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user