diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Channel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Channel.kt index df0ac0bac..9ad0c4966 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Channel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Channel.kt @@ -85,8 +85,6 @@ abstract class Channel { notes.remove(note.idHex) } - abstract fun anyNameStartsWith(prefix: String): Boolean - fun pruneOldMessages(): Set { val important = notes diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/emphChat/EphemeralChatChannel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/emphChat/EphemeralChatChannel.kt index ac9ad74a4..12a28673d 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/emphChat/EphemeralChatChannel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/emphChat/EphemeralChatChannel.kt @@ -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) } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip28PublicChats/PublicChatChannel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip28PublicChats/PublicChatChannel.kt index 0018d3b72..e7ea766eb 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip28PublicChats/PublicChatChannel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip28PublicChats/PublicChatChannel.kt @@ -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 diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip53LiveActivities/LiveActivitiesChannel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip53LiveActivities/LiveActivitiesChannel.kt index cf05a495e..f846613e9 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip53LiveActivities/LiveActivitiesChannel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip53LiveActivities/LiveActivitiesChannel.kt @@ -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