Skip to content

Commit

Permalink
[app] show ops dashboard only on debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
Tornaco committed Dec 26, 2021
1 parent a5d3e5f commit 58de705
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package github.tornaco.thanos.android.ops
import android.content.Context
import android.os.Bundle
import androidx.fragment.app.Fragment
import github.tornaco.android.thanos.BuildProp
import github.tornaco.android.thanos.theme.ThemeActivity
import github.tornaco.android.thanos.util.ActivityUtils
import github.tornaco.thanos.android.ops.databinding.ModuleOpsLayoutBottomNavBinding
import github.tornaco.thanos.android.ops.ops.dashboard.OpsDashboardFragment
import github.tornaco.thanos.android.ops.ops.by.ops.AllOpsListFragment
import github.tornaco.thanos.android.ops.ops.dashboard.OpsDashboardFragment

class OpsBottomNavActivity : ThemeActivity() {

Expand All @@ -25,8 +26,9 @@ class OpsBottomNavActivity : ThemeActivity() {
binding = ModuleOpsLayoutBottomNavBinding.inflate(layoutInflater)
setContentView(binding.root)

replaceFragment(OpsDashboardFragment.newInstance())
replaceFragment(AllOpsListFragment.newInstance())

binding.bottomNavigation.menu.findItem(R.id.page_1).isVisible = BuildProp.THANOS_BUILD_DEBUG
binding.bottomNavigation.setOnItemSelectedListener { menu ->
when (menu.itemId) {
R.id.page_1 -> replaceFragment(OpsDashboardFragment.newInstance())
Expand Down

0 comments on commit 58de705

Please sign in to comment.