flipperzero-firmware
flipperzero-firmware copied to clipboard
NFC user dict list, delete, and de-duplication.
What's new
- Mifare Classic user keys can be listed and deleted.
- Duplicate keys (from user DB) can't be added to user database.
- ~~(WIP) A memory leak! Find a way to close strings used in submenu entries.~~ Fixed.
Verification
- Open Mifare Classic Keys menu in NFC
- If user dict is not empty, list button (right) will be active.
- Add a few keys, then select one in the list to delete.
- Verify the correct key was deleted.
- Try to add a key already present in user database, and get informed it already exists.
Checklist (For Reviewer)
- [ ] PR has description of feature/bug or link to Confluence/Jira task
- [ ] Description contains actions to verify feature/bugfix
- [ ] I've built this code, uploaded it to the device and verified feature/bugfix
Hello @djsime1. Thank you for the PR!
Dealing with duplicated keys is a good idea. Also our UX/UI team liked your idea with User dictionary keys listing and deleting. However, we want to add this a little bit differently. Our designer is working on UI for this feature right now and soon it will be in public Miro https://miro.com/app/board/uXjVOlznagk=/?share_link_id=903187096944
I will let you know when the design is ready. Please tell me if you want to rework this PR once design is finalized.
Also some changes came to dev recently. Please, sync the PR with latest dev
Got dev merged, I have limited availability the next few weeks but I'll keep an eye out for that UI/UX being published.
Jumped up to latest dev and fixed issues caused by icon asset changes.
Hello @djsime1 We updated user dictionary flow here https://miro.com/app/board/uXjVOlznagk=/ Please, tell me if you will implement it in this PR
Hello @djsime1 We updated user dictionary flow here https://miro.com/app/board/uXjVOlznagk=/ Please, tell me if you will implement it in this PR
Yes, I can implement that flow. I'll go with the top "Key exists" screen since I don't know how to draw a canvas atop the byteinput. Even if I did, switching to a popup scene is still simpler.

Hopefully I'll have this ready by tomorrow night.
@gornekich I'm almost ready to push my changes, however Miro won't let me download this icon in its raw format. Could you please reply with the icon attached? Thanks.

@djsime1 I added this asset myself, it's already in dev. Is your PR ready for review?
@djsime1 I added this asset myself, it's already in dev. Is your PR ready for review?
The keychain icon currently present in dev is not the same as the Miro keychain icon. The dev one is significantly larger, resulting in the scenes title being truncated from "Mifare Classic Keys" to "MF Classic Keys." ~~Additionally, I think there's one tiny bug about pressing LEFT in the delete confirmation screen.~~
Besides that, it is ready for review. My next commit will ~~fix that LEFT bug,~~ as well as the smaller keychain icon if I receive it before the commit is pushed.
EDIT: Forgot I already fixed the bug with previous commit, so the icon is the only thing that's left. Ready for review!
Hi bro!
We attach that new picture here.

It was pinned to Miiro board but sometimes it's tricky to download it ((
Wrong again I was! The confirmation cancel bug was an odd quirk with the order in which scene loading is handled. Long story short, MFC dict was allocated before the if statement, and free'd at the end of the event callback function. Little did I know the current scenes exit and next scenes enter functions were called in between. Sure enough, the next scene's MFC dict allocate statement was called before our free statement. One last commit and this PR will be finished.
Alright, everything's ready to go!
Sure, I'll get to work on that when I can.
Could someone please review/merge this commit? I've not gotten any feedback in the past week. Thanks!
I’ll take a look today. We’ve been waiting for elf support to be merged first.
Readme changes must have been added by the merge, since I hadn't touched the file at all. I was confused at how the API symbols system worked so I just let it do its thing, but I'll change it back to 1.0. Maintainer push access has been enabled since I originally opened the PR. Lastly, my though process for popup scenes was that you'd be able to dictate where they return too if needed instead of always going to file select. I guess I can undo my changes to the deleted popup since a MFC-Key specific delete scene was added.
Done.