Removes unnecessary spec in Channel

This commit is contained in:
Vitor Pamplona
2025-07-23 09:26:07 -04:00
parent c221506e78
commit 3a0d7ddac1
4 changed files with 3 additions and 5 deletions
@@ -85,8 +85,6 @@ abstract class Channel {
notes.remove(note.idHex)
}
abstract fun anyNameStartsWith(prefix: String): Boolean
fun pruneOldMessages(): Set<Note> {
val important =
notes
@@ -32,5 +32,5 @@ class EphemeralChatChannel(
override fun toBestDisplayName() = roomId.toDisplayKey()
override fun anyNameStartsWith(prefix: String): Boolean = roomId.id.contains(prefix, true)
fun anyNameStartsWith(prefix: String): Boolean = roomId.id.contains(prefix, true)
}
@@ -94,7 +94,7 @@ class PublicChatChannel(
return info.picture ?: creator?.info?.banner
}
override fun anyNameStartsWith(prefix: String): Boolean =
fun anyNameStartsWith(prefix: String): Boolean =
idHex.startsWith(prefix) ||
info.name?.contains(prefix, true) == true ||
info.about?.contains(prefix, true) == true
@@ -61,7 +61,7 @@ class LiveActivitiesChannel(
fun profilePicture(): String? = info?.image()?.ifBlank { null }
override fun anyNameStartsWith(prefix: String): Boolean =
fun anyNameStartsWith(prefix: String): Boolean =
info?.title()?.contains(prefix, true) == true ||
info?.summary()?.contains(prefix, true) == true