aboutsummaryrefslogtreecommitdiff
path: root/foray/Coordinators
diff options
context:
space:
mode:
authorNicholas Tay <nick@windblume.net>2022-03-24 17:07:51 +1100
committerNicholas Tay <nick@windblume.net>2022-03-24 17:07:51 +1100
commitd8624dbf8a9111f931802cbb2759ebd009096552 (patch)
treec0154b234a8274374aada77fd7a63d5dabf00e7e /foray/Coordinators
parent1b292bc251b3dbef532dacad9705bd197ac4227b (diff)
downloadforayios-d8624dbf8a9111f931802cbb2759ebd009096552.tar.gz
forayios-d8624dbf8a9111f931802cbb2759ebd009096552.tar.bz2
forayios-d8624dbf8a9111f931802cbb2759ebd009096552.zip
First attempt at Presenter
This is admittedly pretty hard for me to wrap my head around, and I'm not even using background threading explicitly yet. Will improve.
Diffstat (limited to 'foray/Coordinators')
-rw-r--r--foray/Coordinators/ForayCoordinator.swift6
1 files changed, 2 insertions, 4 deletions
diff --git a/foray/Coordinators/ForayCoordinator.swift b/foray/Coordinators/ForayCoordinator.swift
index 6497ec0..6c4bb3f 100644
--- a/foray/Coordinators/ForayCoordinator.swift
+++ b/foray/Coordinators/ForayCoordinator.swift
@@ -33,7 +33,7 @@ class ForayCoordinator: Coordinator {
let detailViewController = ForayDetailViewController()
- func showDetails(item: PenguinItem) {
+ func showDetails(item: PenguinItemViewModel) {
let image: UIImage
var description: String = "Type: "
switch item.type {
@@ -45,9 +45,7 @@ class ForayCoordinator: Coordinator {
image = UIImage(named: "spy")!
}
description += "\nID: " + item.id
- let dateFormatter = DateFormatter()
- dateFormatter.dateFormat = "yyyy-MM-dd"
- description += "\nReleased: " + dateFormatter.string(from: item.releaseDate)
+ description += "\nReleased: " + item.releaseDateFormatted
detailViewController.setDetails(name: item.name, description: description, image: image)
push(vc: detailViewController)