mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-28 19:17:08 +02:00
Closes subscriptions regardless with they are active or not.
This commit is contained in:
@@ -131,12 +131,10 @@ abstract class NostrDataSource(val debugName: String) {
|
||||
|
||||
open fun stop() {
|
||||
subscriptions.values.forEach { channel ->
|
||||
if (channel.typedFilters != null) {// if it is active, close
|
||||
Client.close(channel.id)
|
||||
channel.typedFilters = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun requestNewChannel(onEOSE: ((Long) -> Unit)? = null): Subscription {
|
||||
val newSubscription = Subscription(UUID.randomUUID().toString().substring(0,4), onEOSE)
|
||||
|
Reference in New Issue
Block a user