[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
This commit is contained in:
Albert Kharisov 2021-12-14 03:52:13 +04:00 committed by GitHub
parent 1232defcf1
commit 965067b5bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,8 +115,10 @@ bool IrdaAppSceneRemote::on_event(IrdaApp* app, IrdaAppEvent* event) {
break; break;
} }
} else if(event->type == IrdaAppEvent::Type::Back) { } else if(event->type == IrdaAppEvent::Type::Back) {
app->search_and_switch_to_previous_scene( if(!button_pressed) {
{IrdaApp::Scene::Start, IrdaApp::Scene::RemoteList}); app->search_and_switch_to_previous_scene(
{IrdaApp::Scene::Start, IrdaApp::Scene::RemoteList});
}
} else { } else {
consumed = false; consumed = false;
} }