Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archive: Favorite .mag files #110

Merged
merged 5 commits into from
Apr 30, 2024
Merged

Archive: Favorite .mag files #110

merged 5 commits into from
Apr 30, 2024

Conversation

zacharyweiss
Copy link
Contributor

@zacharyweiss zacharyweiss commented Apr 26, 2024

What's new

  • Impl favoriting .mag files (for use with magspoof commit >= 3ad981c)
  • Adds mag_card_10px.png to archive; I_mag_card_10px to symbols

For the reviewer

  • I've uploaded the firmware with this patch to a device and verified its functionality
  • I've confirmed the bug to be fixed / feature to be stable

@zacharyweiss
Copy link
Contributor Author

Nix this if it seems out-of-scope, I can imagine that adding each EXT fap to have favoritable files could become unwieldy to maintain; don't want to set the wrong precedent by accident.

@zacharyweiss
Copy link
Contributor Author

Do I need to manually run the build with f18 targets to configure those symbols properly? Haven't made FW PRs that cause a change to the API ver before

targets/f7/api_symbols.csv Outdated Show resolved Hide resolved
applications/main/archive/helpers/archive_browser.h Outdated Show resolved Hide resolved
@@ -34,6 +34,8 @@ const char* archive_get_flipper_app_name(ArchiveFileTypeEnum file_type) {
return "Bad KB";
case ArchiveFileTypeWAV:
return EXT_PATH("apps/Media/wav_player.fap");
case ArchiveFileTypeMag:
return EXT_PATH("apps/GPIO/magspoof.fap");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also reminds me about the wav player, for the previous files we added support for, we moved the applications to the firmware repository. The idea was that if one day we were to make a build without apps included, these that have file associations would be included anyway. But now I'm not so sure, on both of these things. I'm not sure if we'd actually ever have a build without apps, sounds like unnecessary complexity and confusion, and would need some rework of the webupdater. And even if we do decide to do that, I'm not sure that including the apps regardless just because they have file associations, would make sense. Could just be that if you did install one without apps, then it would give an error for the app missing...

Nothing to change here, just a discussion we'll have to go over with the team

Copy link
Contributor Author

@zacharyweiss zacharyweiss Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I wonder if we could do something clever like implement an optional ArchiveSupportedFaps interface, like NFC does with NfcSupportedCardsPlugin, where one can populate the relevant stuct fields (just file icon and fap path?) and then the list gets auto-built onload of the archive. Probably out of scope, but would eliminate maintenance edits like this, and handle the above edge case you're mentioning nicely. Would leave it up to FAP authors to implement or not, and I don't think it'd cause conflicts across FWs (or if so, easy enough to just wrap in an ifdef like the other FW-specific features)

@Willy-JL
Copy link
Member

I'll get the app updates merged in and update the submodule in this Pr

Also no, we don't deal with f18 (yet) so we leave it fully untouched to avoid unnecessary merge conflicts

Copy link
Member

@Willy-JL Willy-JL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, works nicely. thanks!

@Willy-JL
Copy link
Member

not sure why the build is failing tho

@Willy-JL
Copy link
Member

ah its because of my changes to fbt_options.py, doesnt seem to play well here for some reason, probably due to how the repo is cloned on PRs

@Willy-JL Willy-JL merged commit 0e8806c into Next-Flip:dev Apr 30, 2024
2 checks passed
@Willy-JL Willy-JL added the enhancement New enhancement or request label Apr 30, 2024
@zacharyweiss zacharyweiss deleted the fav branch April 30, 2024 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New enhancement or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants