CardDetected event now also triggers on_event callback

This commit is contained in:
RebornedBrain 2023-12-14 13:05:17 +03:00
parent 94e8e5d498
commit 1a56ce77e2

View File

@ -197,6 +197,10 @@ static bool nfc_protocol_support_scene_read_on_event(NfcApp* instance, SceneMana
instance->scene_manager, NfcSceneDetect); instance->scene_manager, NfcSceneDetect);
} }
consumed = true; consumed = true;
} else if(event.event == NfcCustomEventCardDetected) {
const NfcProtocol protocol =
instance->protocols_detected[instance->protocols_detected_selected_idx];
consumed = nfc_protocol_support[protocol]->scene_read.on_event(instance, event.event);
} }
} else if(event.type == SceneManagerEventTypeBack) { } else if(event.type == SceneManagerEventTypeBack) {
nfc_poller_stop(instance->poller); nfc_poller_stop(instance->poller);