Skip to content

Commit 028898d

Browse files
authored
sort by recent data and by pledge like website (#648)
## Summary When sorting the gallery by pledge or by recent data, the smallest pledges or least recently update goals were shown first. This is in contrast with what the website does and what the app previously did. The app currently does not provide for easily flipping the direction of these sorting tactics. ## Validation Compared the gallery's order on the website with the app. Bug was introduced in [#607](https://github.com/beeminder/BeeSwift/pull/607/files#diff-a606a3bd59aa90e96475a1104ee2119968cb34b90d9fb33afd497f204dcb03e7L357-L363) where the two previously "reversed" criteria were changed to ascending.
1 parent b137ffd commit 028898d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

BeeSwift/Gallery/GalleryViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,12 +547,12 @@ private extension GalleryViewController {
547547
]
548548
case Constants.recentDataGoalSortString:
549549
return [
550-
NSSortDescriptor(keyPath: \Goal.lastTouch, ascending: true),
550+
NSSortDescriptor(keyPath: \Goal.lastTouch, ascending: false),
551551
NSSortDescriptor(keyPath: \Goal.urgencyKey, ascending: true)
552552
]
553553
case Constants.pledgeGoalSortString:
554554
return [
555-
NSSortDescriptor(keyPath: \Goal.pledge, ascending: true),
555+
NSSortDescriptor(keyPath: \Goal.pledge, ascending: false),
556556
NSSortDescriptor(keyPath: \Goal.urgencyKey, ascending: true)
557557
]
558558
default:

0 commit comments

Comments
 (0)