mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-30 10:54:58 +01:00
code review
This commit is contained in:
parent
94956a2ec6
commit
bb59a758cf
@ -52,7 +52,7 @@ class SharedSecuredStorageResetAllFragment :
|
||||
|
||||
views.ssssResetOtherDevices.debouncedClicks {
|
||||
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
|
||||
data class Args(
|
||||
val userId: String,
|
||||
val allowDeviceAction: Boolean
|
||||
) : Parcelable
|
||||
|
||||
companion object {
|
||||
fun newInstance(userId: String, allowDeviceAction: Boolean = true): DeviceListBottomSheet {
|
||||
fun newInstance(userId: String): DeviceListBottomSheet {
|
||||
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
|
||||
object TrustUtils {
|
||||
|
||||
// XXX why is this using the RoomEncryptionTrustLevel?
|
||||
// should be using a new DeviceTrustShield enum
|
||||
fun shieldForTrust(
|
||||
currentDevice: Boolean,
|
||||
trustMSK: Boolean,
|
||||
|
@ -25,6 +25,8 @@ class GetEncryptionTrustLevelForDeviceUseCase @Inject constructor(
|
||||
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? {
|
||||
if (cryptoDeviceInfo == null) {
|
||||
return null
|
||||
|
Loading…
x
Reference in New Issue
Block a user