Skip to content

Commit

Permalink
teams: smoother search (fixes #5073) (#5074)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <dogi@users.noreply.github.com>
  • Loading branch information
Avinash-Codes and dogi authored Jan 22, 2025
1 parent fd4376e commit 5d24905
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 26
targetSdkVersion 34
versionCode 2225
versionName "0.22.25"
versionCode 2226
versionName "0.22.26"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ class TeamFragment : Fragment(), AdapterTeamList.OnClickTeamItem {
.notEqualTo("status", "archived")
.contains("name", charSequence.toString(), Case.INSENSITIVE)
val (list, conditionApplied) = getList(query)
val sortedList = sortTeams(list)
val sortedList = list.sortedWith(compareByDescending<RealmMyTeam> { it.name?.startsWith(charSequence.toString(), ignoreCase = true) }
.thenBy { it.name })
val adapterTeamList = AdapterTeamList(
activity as Context, sortedList, mRealm, childFragmentManager
)
Expand Down

0 comments on commit 5d24905

Please sign in to comment.