diff --git a/app/src/main/java/org/lineageos/twelve/fragments/MainFragment.kt b/app/src/main/java/org/lineageos/twelve/fragments/MainFragment.kt index f9b085df..58b11b05 100644 --- a/app/src/main/java/org/lineageos/twelve/fragments/MainFragment.kt +++ b/app/src/main/java/org/lineageos/twelve/fragments/MainFragment.kt @@ -90,7 +90,14 @@ class MainFragment : Fragment(R.layout.fragment_main) { override fun onPageSelected(position: Int) { super.onPageSelected(position) - navigationBarView.menu.getItem(position).isChecked = true + var offset = 0 + + // Search button + if (position >= 1) { + offset += 1 + } + + navigationBarView.menu.getItem(position + offset).isChecked = true } } }