Adds the logged in user' posts to a user in the user's profile.
Refactors the user profile screen in many packages.
This commit is contained in:
@@ -57,6 +57,9 @@ data class ATag(
|
||||
const val TAG_NAME = "a"
|
||||
const val TAG_SIZE = 2
|
||||
|
||||
@JvmStatic
|
||||
fun isTagged(tag: Array<String>) = tag.size >= 2 && tag[0] == TAG_NAME && tag[1].isNotEmpty()
|
||||
|
||||
@JvmStatic
|
||||
fun isSameAddress(
|
||||
tag1: Array<String>,
|
||||
|
||||
@@ -24,6 +24,7 @@ import androidx.compose.runtime.Immutable
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
import com.vitorpamplona.quartz.nip01Core.signers.NostrSigner
|
||||
import com.vitorpamplona.quartz.nip01Core.tags.addressables.ATag
|
||||
import com.vitorpamplona.quartz.nip01Core.tags.events.ETag
|
||||
import com.vitorpamplona.quartz.nip31Alts.AltTag
|
||||
import com.vitorpamplona.quartz.utils.TimeUtils
|
||||
|
||||
@@ -36,6 +37,8 @@ class BookmarkListEvent(
|
||||
content: String,
|
||||
sig: HexKey,
|
||||
) : GeneralListEvent(id, pubKey, createdAt, KIND, tags, content, sig) {
|
||||
fun countBookmarks() = tags.count(ETag::isTagged) + tags.count(ATag::isTagged)
|
||||
|
||||
companion object {
|
||||
const val KIND = 30001
|
||||
const val ALT = "List of bookmarks"
|
||||
|
||||
Reference in New Issue
Block a user