[FL-1537] NFC launch from archive (#580)

* archive: pass full file path as App argument
* nfc: add starting emulation from Archive
* nfc, ibutton: rework setting key name with path lib
* archive: revert launching app with full file path

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
gornekich
2021-07-16 00:39:21 +03:00
committed by GitHub
parent 851a44dc59
commit a837bc5d00
4 changed files with 28 additions and 14 deletions

View File

@@ -95,9 +95,6 @@ Nfc* nfc_alloc() {
NfcViewMifareUl,
nfc_mifare_ul_get_view(nfc->nfc_mifare_ul));
// Run first scene
scene_manager_next_scene(nfc->scene_manager, NfcSceneStart);
return nfc;
}
@@ -169,6 +166,13 @@ void nfc_free(Nfc* nfc) {
int32_t nfc_task(void* p) {
Nfc* nfc = nfc_alloc();
// Check argument and run corresponding scene
if(p && nfc_device_load(&nfc->device, p)) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid);
} else {
scene_manager_next_scene(nfc->scene_manager, NfcSceneStart);
}
view_dispatcher_run(nfc->nfc_common.view_dispatcher);
nfc_free(nfc);