Skip to content

Commit

Permalink
courses: smoother mycourses list (fixes #4741) (#4742)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Okuro3499 and dogi authored Nov 5, 2024
1 parent 2183dd8 commit e59ee60
Show file tree
Hide file tree
Showing 2 changed files with 6 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 2079
versionName "0.20.79"
versionCode 2080
versionName "0.20.80"
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 @@ -197,7 +197,7 @@ class CoursesFragment : BaseRecyclerFragment<RealmMyCourse?>(), OnCourseItemSele
confirmation.show()
addToMyList()
selectedItems?.clear()
tvAddToLib.isEnabled = false // selectedItems will always have a size of 0
tvAddToLib.isEnabled = false
checkList()
}
}
Expand Down Expand Up @@ -251,6 +251,9 @@ class CoursesFragment : BaseRecyclerFragment<RealmMyCourse?>(), OnCourseItemSele
btnRemove.visibility = View.GONE
tvSelected.visibility = View.GONE
btnArchive.visibility = View.GONE
} else {
val allMyCourses = adapterCourses.getCourseList().all { it?.isMyCourse == true }
selectAll.visibility = if (allMyCourses) View.GONE else View.VISIBLE
}
}

Expand Down

0 comments on commit e59ee60

Please sign in to comment.