Forces an updateFilter at the start of new subs.
This commit is contained in:
+5
-4
@@ -34,10 +34,6 @@ class NostrClientSubscription(
|
|||||||
) : IRelayClientListener {
|
) : IRelayClientListener {
|
||||||
private val subId = RandomInstance.randomChars(10)
|
private val subId = RandomInstance.randomChars(10)
|
||||||
|
|
||||||
init {
|
|
||||||
client.subscribe(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onEvent(
|
override fun onEvent(
|
||||||
relay: IRelayClient,
|
relay: IRelayClient,
|
||||||
subId: String,
|
subId: String,
|
||||||
@@ -57,4 +53,9 @@ class NostrClientSubscription(
|
|||||||
fun updateFilter() = client.openReqSubscription(subId, filter())
|
fun updateFilter() = client.openReqSubscription(subId, filter())
|
||||||
|
|
||||||
fun closeSubscription() = client.close(subId)
|
fun closeSubscription() = client.close(subId)
|
||||||
|
|
||||||
|
init {
|
||||||
|
client.subscribe(this)
|
||||||
|
updateFilter()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user