Skip to content

Commit

Permalink
changed shelf to desired tags
Browse files Browse the repository at this point in the history
  • Loading branch information
pavi38 committed Jan 17, 2025
1 parent 61e6148 commit 5f2483b
Showing 1 changed file with 3 additions and 2 deletions.
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 5f2483b

Please sign in to comment.