forked from shadowfacts/Tusker
Fix saved hashtags sorting being case-sensitive
This commit is contained in:
parent
1f0025b101
commit
68b03838a2
|
@ -198,7 +198,7 @@ class ExploreViewController: UIViewController, UICollectionViewDelegate {
|
||||||
@MainActor
|
@MainActor
|
||||||
private func fetchSavedHashtags() -> [SavedHashtag] {
|
private func fetchSavedHashtags() -> [SavedHashtag] {
|
||||||
let req = SavedHashtag.fetchRequest()
|
let req = SavedHashtag.fetchRequest()
|
||||||
req.sortDescriptors = [NSSortDescriptor(key: "name", ascending: true)]
|
req.sortDescriptors = [NSSortDescriptor(key: "name", ascending: true, selector: #selector(NSString.localizedCompare(_:)))]
|
||||||
do {
|
do {
|
||||||
return try mastodonController.persistentContainer.viewContext.fetch(req)
|
return try mastodonController.persistentContainer.viewContext.fetch(req)
|
||||||
} catch {
|
} catch {
|
||||||
|
|
|
@ -228,7 +228,7 @@ class MainSidebarViewController: UIViewController {
|
||||||
@MainActor
|
@MainActor
|
||||||
private func fetchSavedHashtags() -> [SavedHashtag] {
|
private func fetchSavedHashtags() -> [SavedHashtag] {
|
||||||
let req = SavedHashtag.fetchRequest()
|
let req = SavedHashtag.fetchRequest()
|
||||||
req.sortDescriptors = [NSSortDescriptor(key: "name", ascending: true)]
|
req.sortDescriptors = [NSSortDescriptor(key: "name", ascending: true, selector: #selector(NSString.localizedCompare(_:)))]
|
||||||
do {
|
do {
|
||||||
return try mastodonController.persistentContainer.viewContext.fetch(req)
|
return try mastodonController.persistentContainer.viewContext.fetch(req)
|
||||||
} catch {
|
} catch {
|
||||||
|
|
Loading…
Reference in New Issue