kopia lustrzana https://github.com/vitorpamplona/amethyst
use r tag instead of g (reserved for geotag)
rodzic
d2af7ba407
commit
8421dbfa4c
|
@ -119,7 +119,7 @@ open class Event(
|
|||
|
||||
override fun taggedEvents() = tags.filter { it.size > 1 && it[0] == "e" }.map { it[1] }
|
||||
|
||||
override fun taggedGalleryEntries() = tags.filter { it.size > 2 && it[0] == "g" }.map { GalleryUrl(it[1], it[2]) }
|
||||
override fun taggedGalleryEntries() = tags.filter { it.size > 2 && it[0] == "r" }.map { GalleryUrl(it[1], it[2]) }
|
||||
|
||||
override fun taggedUrls() = tags.filter { it.size > 1 && it[0] == "r" }.map { it[1] }
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class GalleryListEvent(
|
|||
signer: NostrSigner,
|
||||
createdAt: Long = TimeUtils.now(),
|
||||
onReady: (GalleryListEvent) -> Unit,
|
||||
) = addTag(earlierVersion, "g", eventId, url, signer, createdAt, onReady)
|
||||
) = addTag(earlierVersion, "r", eventId, url, signer, createdAt, onReady)
|
||||
|
||||
fun addTag(
|
||||
earlierVersion: GalleryListEvent?,
|
||||
|
@ -90,7 +90,7 @@ class GalleryListEvent(
|
|||
signer: NostrSigner,
|
||||
createdAt: Long = TimeUtils.now(),
|
||||
onReady: (GalleryListEvent) -> Unit,
|
||||
) = removeTag(earlierVersion, "g", eventId, url, signer, createdAt, onReady)
|
||||
) = removeTag(earlierVersion, "r", eventId, url, signer, createdAt, onReady)
|
||||
|
||||
fun removeReplaceable(
|
||||
earlierVersion: GalleryListEvent,
|
||||
|
@ -99,7 +99,7 @@ class GalleryListEvent(
|
|||
signer: NostrSigner,
|
||||
createdAt: Long = TimeUtils.now(),
|
||||
onReady: (GalleryListEvent) -> Unit,
|
||||
) = removeTag(earlierVersion, "g", aTag.toTag(), url, signer, createdAt, onReady)
|
||||
) = removeTag(earlierVersion, "r", aTag.toTag(), url, signer, createdAt, onReady)
|
||||
|
||||
private fun removeTag(
|
||||
earlierVersion: GalleryListEvent,
|
||||
|
|
Ładowanie…
Reference in New Issue