Skip to content

Commit

Permalink
courses: smoother list (fixes #4745) (#4746)
Browse files Browse the repository at this point in the history
* show not joined course first

* Update build.gradle

---------

Co-authored-by: dogi <[email protected]>
  • Loading branch information
Okuro3499 and dogi authored Nov 5, 2024
1 parent 709c06b commit 8c3ce88
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 2082
versionName "0.20.82"
versionCode 2083
versionName "0.20.83"
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 @@ -71,7 +71,8 @@ class CoursesFragment : BaseRecyclerFragment<RealmMyCourse?>(), OnCourseItemSele
val map = getRatings(mRealm, "course", model?.id)
val progressMap = getCourseProgress(mRealm, model?.id)
val courseList: List<RealmMyCourse?> = getList(RealmMyCourse::class.java).filterIsInstance<RealmMyCourse?>()
adapterCourses = AdapterCourses(requireActivity(), courseList, map)
val sortedCourseList = courseList.sortedWith(compareBy({ it?.isMyCourse }, { it?.courseTitle }))
adapterCourses = AdapterCourses(requireActivity(), sortedCourseList, map)
adapterCourses.setProgressMap(progressMap)
adapterCourses.setmRealm(mRealm)
adapterCourses.setListener(this)
Expand Down

0 comments on commit 8c3ce88

Please sign in to comment.