Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed May 23, 2023
1 parent 94956a2 commit 65d6296
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 65d6296

Please sign in to comment.