Capture strong references in ToggleFollowHashtagService retry actions

This commit is contained in:
Shadowfacts 2023-01-15 10:33:06 -05:00
parent ac0dedfd3d
commit d75c2558ca
1 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ class ToggleFollowHashtagService {
config.systemImageName = "checkmark"
config.dismissAutomaticallyAfter = 2
} catch {
config = ToastConfiguration(from: error, with: "Error Unfollowing Hashtag", in: presenter) { [unowned self] toast in
config = ToastConfiguration(from: error, with: "Error Unfollowing Hashtag", in: presenter) { toast in
toast.dismissToast(animated: true)
await self.toggleFollow()
}
@ -54,7 +54,7 @@ class ToggleFollowHashtagService {
config.systemImageName = "checkmark"
config.dismissAutomaticallyAfter = 2
} catch {
config = ToastConfiguration(from: error, with: "Error Following Hashtag", in: presenter) { [unowned self] toast in
config = ToastConfiguration(from: error, with: "Error Following Hashtag", in: presenter) { toast in
toast.dismissToast(animated: true)
await self.toggleFollow()
}