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

Fix iPad share #579

Merged
merged 6 commits into from
Sep 10, 2023
Merged

Fix iPad share #579

merged 6 commits into from
Sep 10, 2023

Conversation

EricBAndrews
Copy link
Member

@EricBAndrews EricBAndrews commented Sep 6, 2023

Checklist

  • I have read CONTRIBUTING.md
  • I have described what this PR contains
  • This PR addresses one or more open issues that were assigned to me:
    - Crash on iPad share #578
  • If this PR alters the UI, I have attached pictures/videos

Pull Request Information

This PR addresses an issue where sharing from iPad would crash the app. This was due to the use of showShareSheet, which was not iPad-compatible. This PR replaces all instance of showShareSheet with a ShareLink.

To support this, it also performs a refactor of how menu items work:

  • MenuFunction is now an enum with an associated type, either ShareMenuFunction or StandardMenuFunction.
  • MenuButton now displays a ShareLink for MenuFunction.share and a regular menu button for MenuFunction.standard.
  • Destructive actions now have their own ViewModifier for easy reuse, and have been populated everywhere they're needed

@EricBAndrews EricBAndrews marked this pull request as ready for review September 6, 2023 17:38
@EricBAndrews EricBAndrews requested a review from a team as a code owner September 6, 2023 17:38
@EricBAndrews EricBAndrews requested review from WestonHanners and mormaer and removed request for a team September 6, 2023 17:38
@EricBAndrews EricBAndrews merged commit 497bdd2 into dev Sep 10, 2023
3 checks passed
@EricBAndrews EricBAndrews deleted the eric/ipad-share branch September 10, 2023 16:42
@EricBAndrews EricBAndrews mentioned this pull request Sep 11, 2023
boscojwho pushed a commit to boscojwho/mlem that referenced this pull request Sep 16, 2023
boscojwho pushed a commit that referenced this pull request Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants