aboutsummaryrefslogtreecommitdiff
path: root/foray/Coordinators
diff options
context:
space:
mode:
authorNicholas Tay <nick@windblume.net>2022-03-25 09:25:35 +1100
committerNicholas Tay <nick@windblume.net>2022-03-25 09:25:35 +1100
commitfe60f99848498a932d9113f8e516700a836dd1cd (patch)
tree282b8a7f420754f81e1e2c5fed381221b34a9846 /foray/Coordinators
parentd8624dbf8a9111f931802cbb2759ebd009096552 (diff)
downloadforayios-fe60f99848498a932d9113f8e516700a836dd1cd.tar.gz
forayios-fe60f99848498a932d9113f8e516700a836dd1cd.tar.bz2
forayios-fe60f99848498a932d9113f8e516700a836dd1cd.zip
Move Details ViewModel -> string/image into VC
Diffstat (limited to 'foray/Coordinators')
-rw-r--r--foray/Coordinators/ForayCoordinator.swift15
1 files changed, 1 insertions, 14 deletions
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)
}