Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Okuro3499 committed Jul 3, 2024
1 parent d2fe551 commit b3742b4
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,12 @@ class MyTeamsDetailFragment : BaseNewsFragment() {

private fun setCourseList(tab: TabLayout.Tab, courses: RealmResults<RealmMyCourse>) {
hideRv(tab, String.format(getString(R.string.courses_colon) + " (%s)", courses.size))
listContent.adapter =
ArrayAdapter(requireActivity(), android.R.layout.simple_list_item_1, courses)
listContent.onItemClickListener =
AdapterView.OnItemClickListener { _: AdapterView<*>?, _: View?, i: Int, _: Long ->
if (homeItemClickListener != null) {
openFragment(courses[i]?.courseId, TakeCourseFragment())
}
listContent.adapter = ArrayAdapter(requireActivity(), android.R.layout.simple_list_item_1, courses)
listContent.onItemClickListener = AdapterView.OnItemClickListener { _: AdapterView<*>?, _: View?, i: Int, _: Long ->
if (homeItemClickListener != null) {
openFragment(courses[i]?.courseId, TakeCourseFragment())
}
}
}

private fun hideRv(tab: TabLayout.Tab, s: String) {
Expand Down

0 comments on commit b3742b4

Please sign in to comment.