Просмотр исходного кода

[FL-2603] Infrared: exit app properly if ran from outside the launcher (#1340)

* Exit app if no previous scene was found
* Infrared: correct return logic for started from archive app

Co-authored-by: あく <alleteam@gmail.com>
Georgii Surkov 3 лет назад
Родитель
Сommit
0b83316560
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      applications/infrared/scenes/infrared_scene_remote.c

+ 1 - 2
applications/infrared/scenes/infrared_scene_remote.c

@@ -79,9 +79,8 @@ bool infrared_scene_remote_on_event(void* context, SceneManagerEvent event) {
 
     if(event.type == SceneManagerEventTypeBack) {
         const uint32_t possible_scenes[] = {InfraredSceneRemoteList, InfraredSceneStart};
-        scene_manager_search_and_switch_to_previous_scene_one_of(
+        consumed = scene_manager_search_and_switch_to_previous_scene_one_of(
             scene_manager, possible_scenes, sizeof(possible_scenes) / sizeof(uint32_t));
-        consumed = true;
     } else if(event.type == SceneManagerEventTypeCustom) {
         const uint16_t custom_type = infrared_custom_event_get_type(event.event);
         const int16_t button_index = infrared_custom_event_get_value(event.event);