Skip to content

Commit

Permalink
Merge branch 'master' into 5050-res-downloaded-dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
dogi authored Jan 20, 2025
2 parents 7d14aa5 + 54c65d0 commit 36799de
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,9 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
val b = Bundle()
b.putBoolean("isMyCourseLib", true)
f.arguments = b
openCallFragment(f, "shelf")
val fragmentName = f::class.java.simpleName
val tag = "My$fragmentName"
openCallFragment(f, tag)
}

override fun onDestroy() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,9 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
val b = Bundle()
b.putBoolean("isMyCourseLib", true)
f.arguments = b
openCallFragment(f, "shelf")
val fragmentName = f::class.java.simpleName
val tag = "My$fragmentName"
openCallFragment(f, tag)
}

override fun onDestroy() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ abstract class DashboardElementActivity : SyncActivity(), FragmentManager.OnBack
profileDbHandler = UserProfileDbHandler(this)
settings = applicationContext.getSharedPreferences(PREFS_NAME, MODE_PRIVATE)
prefData = SharedPrefManager(this)
supportFragmentManager.addOnBackStackChangedListener(this)
}

fun onClickTabItems(position: Int) {
Expand Down Expand Up @@ -246,13 +247,13 @@ abstract class DashboardElementActivity : SyncActivity(), FragmentManager.OnBack
val f = supportFragmentManager.findFragmentById(R.id.fragment_container)
val fragmentTag = f?.tag
if (f is CoursesFragment) {
if ("shelf" == fragmentTag) {
if ("MyCoursesFragment" == fragmentTag) {
navigationView.menu.findItem(R.id.menu_mycourses).isChecked = true
} else {
navigationView.menu.findItem(R.id.menu_courses).isChecked = true
}
} else if (f is ResourcesFragment) {
if ("shelf" == fragmentTag) {
if ("MyResourcesFragment" == fragmentTag) {
navigationView.menu.findItem(R.id.menu_mylibrary).isChecked = true
} else {
navigationView.menu.findItem(R.id.menu_library).isChecked = true
Expand Down

0 comments on commit 36799de

Please sign in to comment.