Fixing Ephemeral Chat interface
This commit is contained in:
+10
-1
@@ -26,8 +26,17 @@ import com.vitorpamplona.quartz.nip01Core.relay.normalizer.displayUrl
|
||||
data class RoomId(
|
||||
val id: String,
|
||||
val relayUrl: NormalizedRelayUrl,
|
||||
) {
|
||||
) : Comparable<RoomId> {
|
||||
fun toKey() = "$id@$relayUrl"
|
||||
|
||||
fun toDisplayKey() = id + "@" + relayUrl.displayUrl()
|
||||
|
||||
override fun compareTo(other: RoomId): Int {
|
||||
val result = id.compareTo(other.id)
|
||||
return if (result == 0) {
|
||||
relayUrl.url.compareTo(other.relayUrl.url)
|
||||
} else {
|
||||
result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ class RelayTag {
|
||||
ensure(tag[0] == TAG_NAME) { return null }
|
||||
ensure(tag[1].isNotEmpty()) { return null }
|
||||
|
||||
return RelayUrlNormalizer.normalizeOrNull(tag[1]) ?: return null
|
||||
return RelayUrlNormalizer.normalizeOrNull(tag[1])
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
|
||||
-1
@@ -149,7 +149,6 @@ open class BasicRelayClient(
|
||||
|
||||
override fun onMessage(text: String) {
|
||||
// Log.d(logTag, "Receiving: $text")
|
||||
|
||||
stats.addBytesReceived(text.bytesUsedInMemory())
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user