Removes unnecessary spec in Channel
This commit is contained in:
@@ -85,8 +85,6 @@ abstract class Channel {
|
||||
notes.remove(note.idHex)
|
||||
}
|
||||
|
||||
abstract fun anyNameStartsWith(prefix: String): Boolean
|
||||
|
||||
fun pruneOldMessages(): Set<Note> {
|
||||
val important =
|
||||
notes
|
||||
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user