Fix saved hashtags sorting being case-sensitive

This commit is contained in:
Shadowfacts 2022-05-15 10:37:38 -04:00
parent 1f0025b101
commit 68b03838a2
2 changed files with 2 additions and 2 deletions

View File

@ -198,7 +198,7 @@ class ExploreViewController: UIViewController, UICollectionViewDelegate {
@MainActor
private func fetchSavedHashtags() -> [SavedHashtag] {
let req = SavedHashtag.fetchRequest()
req.sortDescriptors = [NSSortDescriptor(key: "name", ascending: true)]
req.sortDescriptors = [NSSortDescriptor(key: "name", ascending: true, selector: #selector(NSString.localizedCompare(_:)))]
do {
return try mastodonController.persistentContainer.viewContext.fetch(req)
} catch {

View File

@ -228,7 +228,7 @@ class MainSidebarViewController: UIViewController {
@MainActor
private func fetchSavedHashtags() -> [SavedHashtag] {
let req = SavedHashtag.fetchRequest()
req.sortDescriptors = [NSSortDescriptor(key: "name", ascending: true)]
req.sortDescriptors = [NSSortDescriptor(key: "name", ascending: true, selector: #selector(NSString.localizedCompare(_:)))]
do {
return try mastodonController.persistentContainer.viewContext.fetch(req)
} catch {