diff options
author | Albert Kharisov <albkharisov@gmail.com> | 2021-12-14 02:52:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 02:52:13 +0300 |
commit | 965067b5bd7fb3fbb77d0459cc9ea10492168ad7 (patch) | |
tree | 79a41d8311c22906a5aa20ea2fc53699cd40b456 /applications/irda | |
parent | 1232defcf10edabe7540518c988727a5b641011a (diff) |
[FL-2132] IRDA: fix crush in Saved Remote (OK + back) (#894)
Pressing Back button before releasing OK on Saved Remote scene
freezes application, because it doesn't expect that button is
pressed when leaving Saved Remote scene.
Issue: 893
Diffstat (limited to 'applications/irda')
-rw-r--r-- | applications/irda/scene/irda-app-scene-remote.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/applications/irda/scene/irda-app-scene-remote.cpp b/applications/irda/scene/irda-app-scene-remote.cpp index 94cf61ec..7a176a8b 100644 --- a/applications/irda/scene/irda-app-scene-remote.cpp +++ b/applications/irda/scene/irda-app-scene-remote.cpp @@ -115,8 +115,10 @@ bool IrdaAppSceneRemote::on_event(IrdaApp* app, IrdaAppEvent* event) { break; } } else if(event->type == IrdaAppEvent::Type::Back) { - app->search_and_switch_to_previous_scene( - {IrdaApp::Scene::Start, IrdaApp::Scene::RemoteList}); + if(!button_pressed) { + app->search_and_switch_to_previous_scene( + {IrdaApp::Scene::Start, IrdaApp::Scene::RemoteList}); + } } else { consumed = false; } |