aboutsummaryrefslogtreecommitdiff
path: root/foray
diff options
context:
space:
mode:
authorNicholas Tay <nick@windblume.net>2022-03-16 14:52:04 +1100
committerNicholas Tay <nick@windblume.net>2022-03-16 15:08:34 +1100
commit912fe67828b25b837c90a5abe96c0633cb9b27fc (patch)
tree2c7b78b03cd09a6f97b8fb16ba0fc56b06e75c63 /foray
parent2096a23d43d271d42b2400c7cca8af5ba8b133c7 (diff)
downloadforayios-912fe67828b25b837c90a5abe96c0633cb9b27fc.tar.gz
forayios-912fe67828b25b837c90a5abe96c0633cb9b27fc.tar.bz2
forayios-912fe67828b25b837c90a5abe96c0633cb9b27fc.zip
Sort items by date first as well for within-section sort
Diffstat (limited to '')
-rw-r--r--foray/ForayTableViewController.swift1
1 files changed, 1 insertions, 0 deletions
diff --git a/foray/ForayTableViewController.swift b/foray/ForayTableViewController.swift
index c984634..35d8052 100644
--- a/foray/ForayTableViewController.swift
+++ b/foray/ForayTableViewController.swift
@@ -80,6 +80,7 @@ class ForayTableViewController: UITableViewController {
func reloadApiData() {
loadApiData(onComplete: { (apiItems) in
self.items = apiItems
+ self.items.sort { (lhs, rhs) in lhs.releaseDate < rhs.releaseDate }
let groups = Dictionary(grouping: self.items) { (item) in
return firstDayOfYear(date: item.releaseDate)