mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Add in existingRequest only if not filtered
This commit is contained in:
parent
4204ab262c
commit
3abce34484
1 changed files with 7 additions and 7 deletions
|
@ -72,13 +72,6 @@ internal class TimelineEventDecryptor(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun requestDecryption(eventId: String) {
|
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) {
|
synchronized(unknownSessionsFailure) {
|
||||||
for (eventIds in unknownSessionsFailure.values) {
|
for (eventIds in unknownSessionsFailure.values) {
|
||||||
if (eventId in eventIds) {
|
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 {
|
executor?.execute {
|
||||||
Realm.getInstance(realmConfiguration).use { realm ->
|
Realm.getInstance(realmConfiguration).use { realm ->
|
||||||
processDecryptRequest(eventId, realm)
|
processDecryptRequest(eventId, realm)
|
||||||
|
|
Loading…
Reference in a new issue