Add in existingRequest only if not filtered
This commit is contained in:
parent
4204ab262c
commit
3abce34484
|
@ -72,13 +72,6 @@ internal class TimelineEventDecryptor(
|
|||
}
|
||||
|
||||
fun requestDecryption(eventId: String) {
|
||||
synchronized(existingRequests) {
|
||||
if (eventId in existingRequests) {
|
||||
Timber.d("Skip Decryption request for event $eventId, already requested")
|
||||
return
|
||||
}
|
||||
existingRequests.add(eventId)
|
||||
}
|
||||
synchronized(unknownSessionsFailure) {
|
||||
for (eventIds in unknownSessionsFailure.values) {
|
||||
if (eventId in eventIds) {
|
||||
|
@ -87,6 +80,13 @@ internal class TimelineEventDecryptor(
|
|||
}
|
||||
}
|
||||
}
|
||||
synchronized(existingRequests) {
|
||||
if (eventId in existingRequests) {
|
||||
Timber.d("Skip Decryption request for event $eventId, already requested")
|
||||
return
|
||||
}
|
||||
existingRequests.add(eventId)
|
||||
}
|
||||
executor?.execute {
|
||||
Realm.getInstance(realmConfiguration).use { realm ->
|
||||
processDecryptRequest(eventId, realm)
|
||||
|
|
Loading…
Reference in New Issue