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 {
|
private fun canRetryKeysDownload(userId: String): Boolean {
|
||||||
var res = false
|
var res = false
|
||||||
|
|
||||||
if (userId.isNotEmpty() && userId.contains(":")) {
|
if (':' in userId) {
|
||||||
try {
|
try {
|
||||||
synchronized(notReadyToRetryHS) {
|
synchronized(notReadyToRetryHS) {
|
||||||
res = !notReadyToRetryHS.contains(userId.substring(userId.lastIndexOf(":") + 1))
|
res = !notReadyToRetryHS.contains(userId.substring(userId.lastIndexOf(":") + 1))
|
||||||
|
|
|
@ -95,7 +95,7 @@ internal class IncomingRoomKeyRequestManager @Inject constructor(
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deviceId == credentials.deviceId && credentials.userId == userId) {
|
if (credentials.deviceId == deviceId && credentials.userId == userId) {
|
||||||
Timber.v("## processReceivedRoomKeyRequests() : oneself device - ignored")
|
Timber.v("## processReceivedRoomKeyRequests() : oneself device - ignored")
|
||||||
cryptoStore.deleteIncomingRoomKeyRequest(request)
|
cryptoStore.deleteIncomingRoomKeyRequest(request)
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -78,9 +78,10 @@ internal class TimelineEventDecryptor(
|
||||||
existingRequests.add(eventId)
|
existingRequests.add(eventId)
|
||||||
}
|
}
|
||||||
synchronized(unknownSessionsFailure) {
|
synchronized(unknownSessionsFailure) {
|
||||||
unknownSessionsFailure.values.forEach {
|
for (it in unknownSessionsFailure.values) {
|
||||||
if (eventId in it) {
|
if (eventId in it) {
|
||||||
Timber.d("Skip Decryption request for event $eventId, unknown session")
|
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}")
|
Timber.v("Get size of ${it.absolutePath}")
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
.sumBy { root.length().toInt() }
|
.sumBy { it.length().toInt() }
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,7 @@ class RoomListViewModel @AssistedInject constructor(@Assisted initialState: Room
|
||||||
setState {
|
setState {
|
||||||
copy(
|
copy(
|
||||||
joiningRoomsIds = joiningRoomsIds - roomId,
|
joiningRoomsIds = joiningRoomsIds - roomId,
|
||||||
joiningErrorRoomsIds = joiningErrorRoomsIds - roomId
|
joiningErrorRoomsIds = joiningErrorRoomsIds + roomId
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue