mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 20:06:51 +03:00
Show debug access only in developer mode
This commit is contained in:
parent
015678ca20
commit
cae7510a77
1 changed files with 5 additions and 1 deletions
|
@ -18,19 +18,22 @@ package im.vector.app.features.home
|
|||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.core.view.isVisible
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.observeK
|
||||
import im.vector.app.core.extensions.replaceChildFragment
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.features.grouplist.GroupListFragment
|
||||
import im.vector.app.features.settings.VectorPreferences
|
||||
import im.vector.app.features.workers.signout.SignOutUiWorker
|
||||
import kotlinx.android.synthetic.main.fragment_home_drawer.*
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
import org.matrix.android.sdk.api.util.toMatrixItem
|
||||
import kotlinx.android.synthetic.main.fragment_home_drawer.*
|
||||
import javax.inject.Inject
|
||||
|
||||
class HomeDrawerFragment @Inject constructor(
|
||||
private val session: Session,
|
||||
private val vectorPreferences: VectorPreferences,
|
||||
private val avatarRenderer: AvatarRenderer
|
||||
) : VectorBaseFragment() {
|
||||
|
||||
|
@ -66,6 +69,7 @@ class HomeDrawerFragment @Inject constructor(
|
|||
}
|
||||
|
||||
// Debug menu
|
||||
homeDrawerHeaderDebugView.isVisible = vectorPreferences.developerMode()
|
||||
homeDrawerHeaderDebugView.debouncedClicks {
|
||||
sharedActionViewModel.post(HomeActivitySharedAction.CloseDrawer)
|
||||
navigator.openDebug(requireActivity())
|
||||
|
|
Loading…
Reference in a new issue