mirror of
https://github.com/vector-im/riotX-android
synced 2025-10-05 15:52:47 +02:00
Gate the Manually verify device behind devtool flag
This commit is contained in:
@@ -17,6 +17,7 @@ import im.vector.app.core.ui.list.genericFooterItem
|
||||
import im.vector.app.core.ui.list.genericItem
|
||||
import im.vector.app.core.ui.views.toDrawableRes
|
||||
import im.vector.app.features.crypto.verification.epoxy.bottomSheetVerificationActionItem
|
||||
import im.vector.app.features.settings.VectorPreferences
|
||||
import im.vector.lib.core.utils.epoxy.charsequence.toEpoxyCharSequence
|
||||
import im.vector.lib.strings.CommonStrings
|
||||
import org.matrix.android.sdk.api.extensions.orFalse
|
||||
@@ -26,7 +27,8 @@ import javax.inject.Inject
|
||||
|
||||
class DeviceVerificationInfoBottomSheetController @Inject constructor(
|
||||
private val stringProvider: StringProvider,
|
||||
private val colorProvider: ColorProvider
|
||||
private val colorProvider: ColorProvider,
|
||||
private val vectorPreferences: VectorPreferences
|
||||
) :
|
||||
TypedEpoxyController<DeviceVerificationInfoBottomSheetViewState>() {
|
||||
|
||||
@@ -244,6 +246,7 @@ class DeviceVerificationInfoBottomSheetController @Inject constructor(
|
||||
|
||||
private fun addVerifyActions(cryptoDeviceInfo: CryptoDeviceInfo) {
|
||||
val host = this
|
||||
if (vectorPreferences.developerMode()) {
|
||||
bottomSheetDividerItem {
|
||||
id("verifyDiv")
|
||||
}
|
||||
@@ -257,6 +260,7 @@ class DeviceVerificationInfoBottomSheetController @Inject constructor(
|
||||
host.callback?.onAction(DevicesAction.VerifyMyDeviceManually(cryptoDeviceInfo.deviceId))
|
||||
}
|
||||
}
|
||||
}
|
||||
bottomSheetDividerItem {
|
||||
id("verifyDiv2")
|
||||
}
|
||||
|
Reference in New Issue
Block a user