mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-29 19:21:52 +01:00
refactoring on method names to make them clearer
This commit is contained in:
parent
dbcf59779e
commit
f10dd38126
@ -108,7 +108,7 @@ object Client : RelayPool.Listener {
|
||||
checkNotInMainThread()
|
||||
|
||||
subscriptions = subscriptions + Pair(subscriptionId, filters)
|
||||
RelayPool.sendFilterOnlyIfDisconnected(subscriptionId)
|
||||
RelayPool.connectAndSendFiltersIfDisconnected()
|
||||
}
|
||||
|
||||
fun send(
|
||||
@ -292,7 +292,7 @@ object Client : RelayPool.Listener {
|
||||
open fun onRelayStateChange(
|
||||
type: Relay.StateType,
|
||||
relay: Relay,
|
||||
channel: String?,
|
||||
subscriptionId: String?,
|
||||
) = Unit
|
||||
|
||||
/** When an relay saves or rejects a new event. */
|
||||
|
@ -409,7 +409,7 @@ class Relay(
|
||||
return buffer.toString()
|
||||
}
|
||||
|
||||
fun sendFilterOnlyIfDisconnected(subscriptionId: String) {
|
||||
fun connectAndSendFiltersIfDisconnected() {
|
||||
checkNotInMainThread()
|
||||
|
||||
if (socket == null) {
|
||||
|
@ -81,8 +81,8 @@ object RelayPool : Relay.Listener {
|
||||
relays.forEach { it.sendFilter(subscriptionId) }
|
||||
}
|
||||
|
||||
fun sendFilterOnlyIfDisconnected(subscriptionId: String) {
|
||||
relays.forEach { it.sendFilterOnlyIfDisconnected(subscriptionId) }
|
||||
fun connectAndSendFiltersIfDisconnected() {
|
||||
relays.forEach { it.connectAndSendFiltersIfDisconnected() }
|
||||
}
|
||||
|
||||
fun sendToSelectedRelays(
|
||||
|
Loading…
x
Reference in New Issue
Block a user