lfrfid enter password scene events handler fix

This commit is contained in:
Methodius 2024-02-01 02:59:21 +09:00 committed by MX
parent 603421bd8c
commit ebcc317816
No known key found for this signature in database
GPG key ID: 7CCC66B7DBDD1C83

View file

@ -7,7 +7,6 @@ void lfrfid_scene_enter_password_on_enter(void* context) {
LfRfid* app = context;
ByteInput* byte_input = app->byte_input;
// true - use password for write, false - use password for clear pass
next_scene = scene_manager_get_scene_state(app->scene_manager, LfRfidSceneEnterPassword);
bool password_set = app->password[0] | app->password[1] | app->password[2] | app->password[3];
@ -38,11 +37,9 @@ bool lfrfid_scene_enter_password_on_event(void* context, SceneManagerEvent event
consumed = true;
scene_manager_next_scene(scene_manager, next_scene);
scene_manager_set_scene_state(scene_manager, LfRfidSceneEnterPassword, 1);
}
} else if(event.type == SceneManagerEventTypeBack) {
uint32_t prev_scenes[] = {LfRfidSceneExtraActions, LfRfidSceneSavedKeyMenu};
scene_manager_set_scene_state(scene_manager, LfRfidSceneEnterPassword, 0);
scene_manager_search_and_switch_to_previous_scene_one_of(
scene_manager, prev_scenes, sizeof(prev_scenes[0]));
}