mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 17:35:54 +03:00
hide reRequest behind developer mode
This commit is contained in:
parent
009d691d5b
commit
b8a9397e73
1 changed files with 13 additions and 13 deletions
|
@ -297,20 +297,20 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted
|
|||
}
|
||||
}
|
||||
|
||||
if (timelineEvent.isEncrypted() && timelineEvent.root.mCryptoError != null) {
|
||||
val keysBackupService = session.cryptoService().keysBackupService()
|
||||
if (keysBackupService.state == KeysBackupState.NotTrusted
|
||||
|| (keysBackupService.state == KeysBackupState.ReadyToBackUp
|
||||
&& keysBackupService.canRestoreKeys())
|
||||
) {
|
||||
add(EventSharedAction.UseKeyBackup)
|
||||
}
|
||||
if (session.cryptoService().getCryptoDeviceInfo(session.myUserId).size > 1) {
|
||||
add(EventSharedAction.ReRequestKey(timelineEvent.eventId))
|
||||
}
|
||||
}
|
||||
|
||||
if (vectorPreferences.developerMode()) {
|
||||
if (timelineEvent.isEncrypted() && timelineEvent.root.mCryptoError != null) {
|
||||
val keysBackupService = session.cryptoService().keysBackupService()
|
||||
if (keysBackupService.state == KeysBackupState.NotTrusted
|
||||
|| (keysBackupService.state == KeysBackupState.ReadyToBackUp
|
||||
&& keysBackupService.canRestoreKeys())
|
||||
) {
|
||||
add(EventSharedAction.UseKeyBackup)
|
||||
}
|
||||
if (session.cryptoService().getCryptoDeviceInfo(session.myUserId).size > 1) {
|
||||
add(EventSharedAction.ReRequestKey(timelineEvent.eventId))
|
||||
}
|
||||
}
|
||||
|
||||
add(EventSharedAction.ViewSource(timelineEvent.root.toContentStringWithIndent()))
|
||||
if (timelineEvent.isEncrypted() && timelineEvent.root.mxDecryptionResult != null) {
|
||||
val decryptedContent = timelineEvent.root.toClearContentStringWithIndent()
|
||||
|
|
Loading…
Reference in a new issue