Address review comments.
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
This commit is contained in:
parent
e28e2dadb9
commit
d071324694
|
@ -63,7 +63,7 @@ internal class DeviceListManager @Inject constructor(private val cryptoStore: IM
|
|||
private fun canRetryKeysDownload(userId: String): Boolean {
|
||||
var res = false
|
||||
|
||||
if (userId.isNotEmpty() && userId.contains(":")) {
|
||||
if (':' in userId) {
|
||||
try {
|
||||
synchronized(notReadyToRetryHS) {
|
||||
res = !notReadyToRetryHS.contains(userId.substring(userId.lastIndexOf(":") + 1))
|
||||
|
|
|
@ -95,7 +95,7 @@ internal class IncomingRoomKeyRequestManager @Inject constructor(
|
|||
continue
|
||||
}
|
||||
|
||||
if (deviceId == credentials.deviceId && credentials.userId == userId) {
|
||||
if (credentials.deviceId == deviceId && credentials.userId == userId) {
|
||||
Timber.v("## processReceivedRoomKeyRequests() : oneself device - ignored")
|
||||
cryptoStore.deleteIncomingRoomKeyRequest(request)
|
||||
continue
|
||||
|
|
|
@ -78,9 +78,10 @@ internal class TimelineEventDecryptor(
|
|||
existingRequests.add(eventId)
|
||||
}
|
||||
synchronized(unknownSessionsFailure) {
|
||||
unknownSessionsFailure.values.forEach {
|
||||
for (it in unknownSessionsFailure.values) {
|
||||
if (eventId in it) {
|
||||
Timber.d("Skip Decryption request for event $eventId, unknown session")
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,5 +132,5 @@ fun getSizeOfFiles(context: Context, root: File): Int {
|
|||
Timber.v("Get size of ${it.absolutePath}")
|
||||
true
|
||||
}
|
||||
.sumBy { root.length().toInt() }
|
||||
.sumBy { it.length().toInt() }
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ class RoomListViewModel @AssistedInject constructor(@Assisted initialState: Room
|
|||
setState {
|
||||
copy(
|
||||
joiningRoomsIds = joiningRoomsIds - roomId,
|
||||
joiningErrorRoomsIds = joiningErrorRoomsIds - roomId
|
||||
joiningErrorRoomsIds = joiningErrorRoomsIds + roomId
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue