mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-18 13:00:18 +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 (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()))
|
add(EventSharedAction.ViewSource(timelineEvent.root.toContentStringWithIndent()))
|
||||||
if (timelineEvent.isEncrypted() && timelineEvent.root.mxDecryptionResult != null) {
|
if (timelineEvent.isEncrypted() && timelineEvent.root.mxDecryptionResult != null) {
|
||||||
val decryptedContent = timelineEvent.root.toClearContentStringWithIndent()
|
val decryptedContent = timelineEvent.root.toClearContentStringWithIndent()
|
||||||
|
|
Loading…
Add table
Reference in a new issue