-
Notifications
You must be signed in to change notification settings - Fork 5
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
IOS-10545 Migrating to Swift 6.0 with strict concurrency #405
base: main
Are you sure you want to change the base?
Changes from all commits
3f3e17b
e2f4dad
997421f
5828fb1
04b3122
66b36b8
3a7ebb3
e1a5d0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -208,8 +208,10 @@ public class FeedbackView: UIView { | |
private lazy var buttonsView: UIView = { | ||
let buttonsView = UIStackView(arrangedSubviews: []) | ||
|
||
[primaryButton, secondaryButton].compactMap { $0 } | ||
.forEach(buttonsView.addArrangedSubview(_:)) | ||
Task { @MainActor in | ||
try [primaryButton, secondaryButton].compactMap { $0 } | ||
.forEach(buttonsView.addArrangedSubview(_:)) | ||
} | ||
|
||
buttonsView.alignment = .fill | ||
buttonsView.axis = .vertical | ||
|
@@ -365,7 +367,7 @@ private extension FeedbackView { | |
} | ||
|
||
// Prepare | ||
views.forEach(prepare(view:)) | ||
try? views.forEach(prepare(view:)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now |
||
// Generate animators | ||
animators = views.map(animation).map { animation in | ||
let animator = animator | ||
|
@@ -410,8 +412,10 @@ private extension FeedbackView { | |
let hapticFeedbackDelay = style.hapticFeedbackDelay else { return } | ||
Timer.scheduledTimer(withTimeInterval: hapticFeedbackDelay, repeats: false) { [weak self] _ in | ||
guard let self = self else { return } | ||
self.feedbackGenerator?.notificationOccurred(hapticFeedbackStyle) | ||
self.feedbackGenerator = nil | ||
Task { @MainActor in | ||
self.feedbackGenerator?.notificationOccurred(hapticFeedbackStyle) | ||
self.feedbackGenerator = nil | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now |
||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now
addArrangedSubview
is isolated:@MainActor open class UIStackView : UIView { .. }