Skip to content

Commit

Permalink
Merge pull request #1519 from tedbrosby/sonny/search-sorted-by-follow…
Browse files Browse the repository at this point in the history
…ers-improvement

Tweaked the search results to prioritize follows
  • Loading branch information
joshuatbrown authored Sep 23, 2024
2 parents 343221e + 611ae82 commit b52876e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed issue where push notifications were not re-registered after account change. [#1501](https://github.com/planetary-social/nos/issues/1501)
- Added support for NIP-62 Request to Vanish events. [#80](https://github.com/planetary-social/nos/issues/80)
- Added Delete Account UI. [#80](https://github.com/planetary-social/nos/issues/80)
- Fixed issue where search results weren't sorted properly. [#1485](https://github.com/planetary-social/nos/issues/1485)

### Internal Changes
- Use NIP-92 media metadata to display media in the proper orientation. Currently behind the “Enable new media display” feature flag. [#1172](https://github.com/planetary-social/nos/issues/1172)
Expand Down
2 changes: 1 addition & 1 deletion Nos/Controller/SearchController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class SearchController: ObservableObject {
guard let authors = try? Author.find(named: name, context: context) else {
return []
}
return authors
return authors.sorted(by: { $0.followers.count > $1.followers.count })
}

func clear() {
Expand Down

0 comments on commit b52876e

Please sign in to comment.