mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-10 12:59:51 +02:00
Avoids recreating the EOSE array when changing filters.
This commit is contained in:
parent
3a76c2a2de
commit
ed491f5e3a
@ -183,7 +183,7 @@ class Relay(
|
||||
}
|
||||
|
||||
fun markConnectionAsReady(pingInMs: Long, usingCompression: Boolean) {
|
||||
this.afterEOSEPerSubscription.clear()
|
||||
this.resetEOSEStatuses()
|
||||
this.isReady = true
|
||||
this.pingInMs = pingInMs
|
||||
this.usingCompression = usingCompression
|
||||
@ -193,7 +193,7 @@ class Relay(
|
||||
this.socket = null
|
||||
this.isReady = false
|
||||
this.usingCompression = false
|
||||
this.afterEOSEPerSubscription.clear()
|
||||
this.resetEOSEStatuses()
|
||||
this.closingTimeInSeconds = TimeUtils.now()
|
||||
}
|
||||
|
||||
@ -270,7 +270,13 @@ class Relay(
|
||||
socket = null
|
||||
isReady = false
|
||||
usingCompression = false
|
||||
afterEOSEPerSubscription.clear()
|
||||
resetEOSEStatuses()
|
||||
}
|
||||
|
||||
fun resetEOSEStatuses() {
|
||||
afterEOSEPerSubscription.forEach {
|
||||
afterEOSEPerSubscription[it.key] = false
|
||||
}
|
||||
}
|
||||
|
||||
fun sendFilter(requestId: String) {
|
||||
@ -290,7 +296,7 @@ class Relay(
|
||||
|
||||
socket?.send(request)
|
||||
eventUploadCounterInBytes += request.bytesUsedInMemory()
|
||||
afterEOSEPerSubscription.clear()
|
||||
resetEOSEStatuses()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -346,7 +346,7 @@ class UserMetadata {
|
||||
}
|
||||
|
||||
@Stable
|
||||
data class ImmutableListOfLists<T>(val lists: Array<Array<T>>)
|
||||
class ImmutableListOfLists<T>(val lists: Array<Array<T>>)
|
||||
|
||||
val EmptyTagList = ImmutableListOfLists<String>(emptyArray())
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user