mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 01:15:54 +03:00
code review
This commit is contained in:
parent
94956a2ec6
commit
bb59a758cf
4 changed files with 5 additions and 6 deletions
|
@ -52,7 +52,7 @@ class SharedSecuredStorageResetAllFragment :
|
||||||
|
|
||||||
views.ssssResetOtherDevices.debouncedClicks {
|
views.ssssResetOtherDevices.debouncedClicks {
|
||||||
withState(sharedViewModel) {
|
withState(sharedViewModel) {
|
||||||
DeviceListBottomSheet.newInstance(it.userId, false).show(childFragmentManager, "DEV_LIST")
|
DeviceListBottomSheet.newInstance(it.userId).show(childFragmentManager, "DEV_LIST")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,13 +100,12 @@ class DeviceListBottomSheet :
|
||||||
@Parcelize
|
@Parcelize
|
||||||
data class Args(
|
data class Args(
|
||||||
val userId: String,
|
val userId: String,
|
||||||
val allowDeviceAction: Boolean
|
|
||||||
) : Parcelable
|
) : Parcelable
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun newInstance(userId: String, allowDeviceAction: Boolean = true): DeviceListBottomSheet {
|
fun newInstance(userId: String): DeviceListBottomSheet {
|
||||||
return DeviceListBottomSheet().apply {
|
return DeviceListBottomSheet().apply {
|
||||||
setArguments(Args(userId, allowDeviceAction))
|
setArguments(Args(userId))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,6 @@ import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel
|
||||||
// TODO Replace usage by the use case GetEncryptionTrustLevelForDeviceUseCase
|
// TODO Replace usage by the use case GetEncryptionTrustLevelForDeviceUseCase
|
||||||
object TrustUtils {
|
object TrustUtils {
|
||||||
|
|
||||||
// XXX why is this using the RoomEncryptionTrustLevel?
|
|
||||||
// should be using a new DeviceTrustShield enum
|
|
||||||
fun shieldForTrust(
|
fun shieldForTrust(
|
||||||
currentDevice: Boolean,
|
currentDevice: Boolean,
|
||||||
trustMSK: Boolean,
|
trustMSK: Boolean,
|
||||||
|
|
|
@ -25,6 +25,8 @@ class GetEncryptionTrustLevelForDeviceUseCase @Inject constructor(
|
||||||
private val getEncryptionTrustLevelForOtherDeviceUseCase: GetEncryptionTrustLevelForOtherDeviceUseCase,
|
private val getEncryptionTrustLevelForOtherDeviceUseCase: GetEncryptionTrustLevelForOtherDeviceUseCase,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
// XXX why is this using the RoomEncryptionTrustLevel?
|
||||||
|
// should be using a new DeviceTrustShield enum
|
||||||
fun execute(currentSessionCrossSigningInfo: CurrentSessionCrossSigningInfo, cryptoDeviceInfo: CryptoDeviceInfo?): RoomEncryptionTrustLevel? {
|
fun execute(currentSessionCrossSigningInfo: CurrentSessionCrossSigningInfo, cryptoDeviceInfo: CryptoDeviceInfo?): RoomEncryptionTrustLevel? {
|
||||||
if (cryptoDeviceInfo == null) {
|
if (cryptoDeviceInfo == null) {
|
||||||
return null
|
return null
|
||||||
|
|
Loading…
Reference in a new issue