From fe60f99848498a932d9113f8e516700a836dd1cd Mon Sep 17 00:00:00 2001 From: Nicholas Tay Date: Fri, 25 Mar 2022 09:25:35 +1100 Subject: Move Details ViewModel -> string/image into VC --- foray/Coordinators/ForayCoordinator.swift | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'foray/Coordinators') diff --git a/foray/Coordinators/ForayCoordinator.swift b/foray/Coordinators/ForayCoordinator.swift index 6c4bb3f..bb0c407 100644 --- a/foray/Coordinators/ForayCoordinator.swift +++ b/foray/Coordinators/ForayCoordinator.swift @@ -34,20 +34,7 @@ class ForayCoordinator: Coordinator { let detailViewController = ForayDetailViewController() func showDetails(item: PenguinItemViewModel) { - let image: UIImage - var description: String = "Type: " - switch item.type { - case .item: - description += "Item" - image = UIImage(named: item.id)! - case .quest: - description += "Quest" - image = UIImage(named: "spy")! - } - description += "\nID: " + item.id - description += "\nReleased: " + item.releaseDateFormatted - - detailViewController.setDetails(name: item.name, description: description, image: image) + detailViewController.setDetails(item: item) push(vc: detailViewController) } -- cgit