Skip to content

Commit

Permalink
Update closures
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-desimone-1 committed Sep 26, 2023
1 parent 978edd8 commit 446bb77
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions SampleApp/Viafoura/Features/Article/ArticleViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ class ArticleViewController: UIViewController, StoryboardCreateable {
return
}

let callbacks: VFActionsCallbacks = { type in
let callbacks: VFActionsCallbacks = { [weak self] type in
switch type {
case .writeNewCommentPressed(let actionType):
self.presentNewCommentViewController(actionType: actionType)
self?.presentNewCommentViewController(actionType: actionType)
case .seeMoreCommentsPressed:
break
case .openProfilePressed(let userUUID, let presentationType):
self.presentProfileViewController(userUUID: userUUID, presentationType: presentationType)
self?.presentProfileViewController(userUUID: userUUID, presentationType: presentationType)
default:
break
}
Expand Down Expand Up @@ -189,15 +189,15 @@ class ArticleViewController: UIViewController, StoryboardCreateable {
return
}

let callbacks: VFActionsCallbacks = { type in
let callbacks: VFActionsCallbacks = { [weak self] type in
switch type {
case .notificationPressed(let presentationType):
switch presentationType {
case .profile(let userUUID):
self.presentProfileViewController(userUUID: userUUID, presentationType: .feed)
self?.presentProfileViewController(userUUID: userUUID, presentationType: .feed)
break
case .content(let containerUUID, let contentUUID, let containerId):
self.presentArticle(containerId: containerId, contentUUID: contentUUID)
self?.presentArticle(containerId: containerId, contentUUID: contentUUID)
break
}
default:
Expand Down

0 comments on commit 446bb77

Please sign in to comment.