@@ -12,6 +12,7 @@ import TinyConstraints
1212class FullPostController: UITableViewController {
1313
1414 var post: Model.Posts?
15+ var type: HeaderType = .NONE
1516
1617 override func viewDidLoad() {
1718 super.viewDidLoad()
@@ -96,10 +97,15 @@ class FullPostController: UITableViewController {
9697
9798 cell.fill(with: PostCellData.create(with: post!.body), true, post: post!)
9899
99− cell.onUserDisplay = { [weak self] (id) in
100− let vc = self?.storyboard!.instantiateViewController(withIdentifier: profileViewController) as! ProfileViewController
101− vc.idProfile = id
102− self?.navigationController?.pushViewController(vc, animated: true)
100+ switch type {
101+ case .NEWS:
102+ cell.onUserDisplay = { [weak self] (id) in
103+ let vc = self?.storyboard!.instantiateViewController(withIdentifier: profileViewController) as! ProfileViewController
104+ vc.idProfile = id
105+ self?.navigationController?.pushViewController(vc, animated: true)
106+ }
107+ default:
108+ break
103109 }
104110
105111 cell.selectionStyle = .none