mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-22 20:43:07 +00:00
NFC: fix retry scene navigation logic (#3439)
* nfc app: fix retry scene navigation logic * nfc app: fix navigation in exit confirm scene Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
parent
6836a7b7c5
commit
b0df852944
2 changed files with 11 additions and 2 deletions
|
@ -31,6 +31,13 @@ bool nfc_scene_exit_confirm_on_event(void* context, SceneManagerEvent event) {
|
|||
if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSelectProtocol)) {
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
nfc->scene_manager, NfcSceneSelectProtocol);
|
||||
} else if(
|
||||
scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneMfClassicDictAttack) &&
|
||||
(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneReadMenu) ||
|
||||
scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSavedMenu))) {
|
||||
const uint32_t possible_scenes[] = {NfcSceneReadMenu, NfcSceneSavedMenu};
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene_one_of(
|
||||
nfc->scene_manager, possible_scenes, COUNT_OF(possible_scenes));
|
||||
} else {
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
nfc->scene_manager, NfcSceneStart);
|
||||
|
|
|
@ -31,8 +31,10 @@ bool nfc_scene_retry_confirm_on_event(void* context, SceneManagerEvent event) {
|
|||
if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSlixUnlock)) {
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
nfc->scene_manager, NfcSceneSlixUnlock);
|
||||
} else if(scene_manager_has_previous_scene(
|
||||
nfc->scene_manager, NfcSceneMfClassicDictAttack)) {
|
||||
} else if(
|
||||
scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneMfClassicDictAttack) &&
|
||||
(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneReadMenu) ||
|
||||
scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSavedMenu))) {
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
nfc->scene_manager, NfcSceneMfClassicDictAttack);
|
||||
} else if(scene_manager_has_previous_scene(
|
||||
|
|
Loading…
Reference in a new issue