Fixes the author of the highlight
This commit is contained in:
@@ -78,7 +78,7 @@ fun RenderHighlight(
|
|||||||
comment = noteEvent.comment(),
|
comment = noteEvent.comment(),
|
||||||
highlight = noteEvent.quote(),
|
highlight = noteEvent.quote(),
|
||||||
context = noteEvent.context(),
|
context = noteEvent.context(),
|
||||||
authorHex = noteEvent.pubKey,
|
authorHex = noteEvent.author(),
|
||||||
url = noteEvent.inUrl(),
|
url = noteEvent.inUrl(),
|
||||||
postAddress = noteEvent.inPostAddress(),
|
postAddress = noteEvent.inPostAddress(),
|
||||||
postVersion = noteEvent.inPostVersion(),
|
postVersion = noteEvent.inPostVersion(),
|
||||||
@@ -124,7 +124,7 @@ fun DisplayHighlight(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val quote =
|
val quote =
|
||||||
remember {
|
remember(highlight) {
|
||||||
highlight.split("\n").joinToString("\n") { "> *${it.removeSuffix(" ")}*" }
|
highlight.split("\n").joinToString("\n") { "> *${it.removeSuffix(" ")}*" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -35,7 +35,7 @@ import com.vitorpamplona.quartz.nip01Core.tags.aTag.firstTaggedAddress
|
|||||||
import com.vitorpamplona.quartz.nip01Core.tags.events.ETag
|
import com.vitorpamplona.quartz.nip01Core.tags.events.ETag
|
||||||
import com.vitorpamplona.quartz.nip01Core.tags.events.firstTaggedEvent
|
import com.vitorpamplona.quartz.nip01Core.tags.events.firstTaggedEvent
|
||||||
import com.vitorpamplona.quartz.nip01Core.tags.people.PTag
|
import com.vitorpamplona.quartz.nip01Core.tags.people.PTag
|
||||||
import com.vitorpamplona.quartz.nip01Core.tags.people.firstTaggedUser
|
import com.vitorpamplona.quartz.nip01Core.tags.people.firstTaggedUserId
|
||||||
import com.vitorpamplona.quartz.nip01Core.tags.references.ReferenceTag
|
import com.vitorpamplona.quartz.nip01Core.tags.references.ReferenceTag
|
||||||
import com.vitorpamplona.quartz.nip10Notes.BaseThreadedEvent
|
import com.vitorpamplona.quartz.nip10Notes.BaseThreadedEvent
|
||||||
import com.vitorpamplona.quartz.nip18Reposts.quotes.QTag
|
import com.vitorpamplona.quartz.nip18Reposts.quotes.QTag
|
||||||
@@ -116,7 +116,7 @@ class HighlightEvent(
|
|||||||
|
|
||||||
fun inUrl() = tags.firstNotNullOfOrNull(ReferenceTag::parse)
|
fun inUrl() = tags.firstNotNullOfOrNull(ReferenceTag::parse)
|
||||||
|
|
||||||
fun author() = firstTaggedUser()
|
fun author() = firstTaggedUserId()
|
||||||
|
|
||||||
fun quote() = content
|
fun quote() = content
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user