-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separates Typed Relay class from a SimpleRelay class to prepare to mo…
…ve to Quartz
- Loading branch information
1 parent
9b0f24b
commit e3e9022
Showing
32 changed files
with
982 additions
and
616 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
package com.vitorpamplona.ammolite.relays | ||
|
||
import android.util.Log | ||
import com.vitorpamplona.ammolite.relays.relays.RelayState | ||
import com.vitorpamplona.ammolite.service.checkNotInMainThread | ||
import com.vitorpamplona.quartz.nip01Core.core.Event | ||
import com.vitorpamplona.quartz.utils.TimeUtils | ||
|
@@ -93,25 +94,20 @@ abstract class NostrDataSource( | |
} | ||
} | ||
|
||
override fun onRelayStateChange( | ||
type: Relay.StateType, | ||
override fun onEOSE( | ||
relay: Relay, | ||
subscriptionId: String?, | ||
subscriptionId: String, | ||
) { | ||
// if (subscriptions.containsKey(subscriptionId)) { | ||
// Log.d([email protected], "Relay ${relay.url} ${subscriptionId} | ||
// ${type.name}") | ||
// } | ||
|
||
if ( | ||
type == Relay.StateType.EOSE && | ||
subscriptionId != null && | ||
subscriptions.containsKey(subscriptionId) | ||
) { | ||
if (subscriptions.containsKey(subscriptionId)) { | ||
markAsEOSE(subscriptionId, relay) | ||
} | ||
} | ||
|
||
override fun onRelayStateChange( | ||
type: RelayState, | ||
relay: Relay, | ||
) {} | ||
|
||
override fun onSendResponse( | ||
eventId: String, | ||
success: Boolean, | ||
|
Oops, something went wrong.