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 issue where swipey view actions publishes updates on background t… #694

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

boscojwho
Copy link
Contributor

@boscojwho boscojwho commented Oct 4, 2023

Checklist

Pull Request Information

About this Pull Request

Fixes issue where SwipeAction.action may attempt to publish changes on background thread, instead of main thread.

  • Move structured concurrency logic out of SwipeAction/SwipeyView, and closer to the model layer where it's actually important.
    ~ For example: Theoretically, we could have a swipe action that's mapped to upvote/downvote (on low power mode) or an automated bug report action that doesn't show any UI. These actions may not necessarily need a .userInitiated priority, and SwipeyView wouldn't know and shouldn't have to deal with that.
  • Follows SwiftUI.Button API pattern (albeit a bit annoying at call site), where call site wraps async calls in an inline synchronous closure.

Screenshots and Videos

No UI changes.

@boscojwho boscojwho requested a review from a team as a code owner October 4, 2023 01:22
@boscojwho boscojwho requested review from JakeShirley and EricBAndrews and removed request for a team October 4, 2023 01:22
@boscojwho boscojwho merged commit 05ef83c into dev Oct 4, 2023
4 checks passed
@boscojwho boscojwho deleted the bosco/fix-swipey-actions-background-publishing branch October 4, 2023 06:38
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.

2 participants