Merge pull request #574 from DarkFlippers/nfc_mfclassic_custom_uid

NFC app: MF Custom UID, fix SAK & ATQA save
This commit is contained in:
MMX 2023-08-14 17:24:59 +03:00 committed by GitHub
commit 9e3868887c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -58,7 +58,8 @@ bool nfc_scene_save_name_on_event(void* context, SceneManagerEvent event) {
if(strcmp(nfc->dev->dev_name, "") != 0) {
nfc_device_delete(nfc->dev, true);
}
if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetUid)) {
if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetUid) &&
(!scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetTypeMfUid))) {
nfc->dev->dev_data.nfc_data = nfc->dev_edit_data;
}
strlcpy(nfc->dev->dev_name, nfc->text_store, strlen(nfc->text_store) + 1);

View file

@ -57,7 +57,7 @@ bool nfc_scene_set_type_on_event(void* context, SceneManagerEvent event) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneSetSak);
consumed = true;
} else if(event.event == SubmenuIndexMFClassicCustomUID) {
nfc->dev->format = NfcDeviceSaveFormatMifareClassic;
nfc_device_clear(nfc->dev);
scene_manager_next_scene(nfc->scene_manager, NfcSceneSetTypeMfUid);
consumed = true;
} else {