Repository navigation
Conversation
…appear AutoWorkoutCard ran its scan from a .task on a Group whose only child is the card, shown once a candidate exists. SwiftUI never runs a .task attached to a Group with no child, so the scan never started and the prompt never appeared on any Today screen, even with "Auto-detect workouts" switched on. A placeholder view would start the task but is no fix here: whenever the detector finds nothing it would sit in the Today stack and add its spacing. The scan now runs in AutoWorkoutCandidateLoader, an ObservableObject the card's body hands the current key (refresh sequence, toggle); it ignores an unchanged key and publishes from its task, never during the view update.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AutoWorkoutCardruns its scan from a.taskon aGroupwhose only child is the card, shown once a candidate exists. SwiftUI never runs a.taskattached to aGroupwith no child, so the scan never starts and the prompt never appears on any Today screen, even with "Auto-detect workouts" switched on. Same root cause as #2765 (journal card).A placeholder view would start the task but is no fix here: whenever the detector finds nothing it would sit in the Today stack and add its spacing. The scan now runs in
AutoWorkoutCandidateLoader, anObservableObjectthe card's body hands the current key (refresh sequence, toggle). It ignores an unchanged key and publishes from its task, never during the view update. Save, dismiss and the "new window resets the session guard" rule behave as before.Verification
.taskon aGroup(or anEmptyView) with no child never runs; an emptyVStackor a zero-size view runs it but adds the stack's spacing.Strandand iOSNOOPiOSbuild.