-
Notifications
You must be signed in to change notification settings - Fork 11
Use @MainActor instead of DispatchQueue.main.async #1055
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
Changes from all commits
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 |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ | |
| import UIKit | ||
| import Combine | ||
|
|
||
| @MainActor | ||
| protocol AttachmentManagerType { | ||
| func open(_ attachment: MessageAttachment) | ||
| } | ||
|
|
@@ -49,13 +50,19 @@ extension AttachmentManager: AttachmentManagerType { | |
| .sinkFuture( | ||
|
Collaborator
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. @tomholub I think we should use
Collaborator
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.
Collaborator
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. Will also file another issue to look over the remaining ones after that, if any |
||
| receiveValue: {}, | ||
| receiveError: { [weak self] error in | ||
| self?.controller?.showToast( | ||
| "\("message_attachment_saved_with_error".localized) \(error.localizedDescription)" | ||
| ) | ||
| self?.handle(error) | ||
| } | ||
| ) | ||
| .store(in: &self.cancellable) | ||
| } | ||
|
|
||
| private func handle(_ error: Error) { | ||
| Task { | ||
| await controller?.showToast( | ||
| "\("message_attachment_saved_with_error".localized) \(error.localizedDescription)" | ||
| ) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // MARK: - FilesManagerPresenter | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.