Adds context to highlight events

This commit is contained in:
Vitor Pamplona 2024-08-13 15:08:32 -04:00
parent 1f9fbb0c86
commit ddb1d7ff82
2 changed files with 4 additions and 0 deletions

View File

@ -75,6 +75,7 @@ fun RenderHighlight(
DisplayHighlight( DisplayHighlight(
highlight = noteEvent.quote(), highlight = noteEvent.quote(),
context = noteEvent.context(),
authorHex = noteEvent.author(), authorHex = noteEvent.author(),
url = noteEvent.inUrl(), url = noteEvent.inUrl(),
postAddress = noteEvent.inPost(), postAddress = noteEvent.inPost(),
@ -92,6 +93,7 @@ fun RenderHighlight(
@Composable @Composable
fun DisplayHighlight( fun DisplayHighlight(
highlight: String, highlight: String,
context: String?,
authorHex: String?, authorHex: String?,
url: String?, url: String?,
postAddress: ATag?, postAddress: ATag?,

View File

@ -40,6 +40,8 @@ class HighlightEvent(
fun quote() = content fun quote() = content
fun context() = firstTagFor("context")
fun inPost() = firstTaggedAddress() fun inPost() = firstTaggedAddress()
fun inPostVersion() = firstTaggedEvent() fun inPostVersion() = firstTaggedEvent()