Add QEventTag
This commit is contained in:
@@ -287,6 +287,7 @@ data class NostrEvent(
|
||||
pubKey = pubKey
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
fun fromEvent(event: Event, synchronizeNostrEventRequest: SynchronizeNostrEventRequest? = null): NostrEvent? = try {
|
||||
|
||||
@@ -45,6 +45,8 @@ import com.vitorpamplona.quartz.nip10Notes.tags.notify
|
||||
import com.vitorpamplona.quartz.nip10Notes.tags.prepareETagsAsReplyTo
|
||||
import com.vitorpamplona.quartz.nip17Dm.settings.ChatMessageRelayListEvent
|
||||
import com.vitorpamplona.quartz.nip18Reposts.RepostEvent
|
||||
import com.vitorpamplona.quartz.nip18Reposts.quotes.QEventTag
|
||||
import com.vitorpamplona.quartz.nip18Reposts.quotes.QTag
|
||||
import com.vitorpamplona.quartz.nip18Reposts.quotes.quotes
|
||||
import com.vitorpamplona.quartz.nip21UriScheme.toNostrUri
|
||||
import com.vitorpamplona.quartz.nip25Reactions.ReactionEvent
|
||||
@@ -245,7 +247,7 @@ class DatabaseNostrRepository(
|
||||
|
||||
val relayHint = null // TODO: get relyhint from where ever the nostrEvent was synced from...
|
||||
|
||||
"\n\n${quotedTextNoteEvent.toNostrUri(relayHint)}"
|
||||
"\n${quotedTextNoteEvent.toNostrUri(relayHint)}"
|
||||
} ?: ""
|
||||
val text: String = textInput + quotedNostrURI
|
||||
|
||||
@@ -283,16 +285,21 @@ class DatabaseNostrRepository(
|
||||
|
||||
quotedNostrEvent?.let {
|
||||
it.profile?.let { profile ->
|
||||
val ptags = arrayOf(
|
||||
profile,
|
||||
// Other profiles tagged in the event...
|
||||
).map { notifyProfile ->
|
||||
val ptags = listOf(
|
||||
PTag(
|
||||
notifyProfile.publicKey,
|
||||
profile.publicKey,
|
||||
// TODO: Add relayHints...
|
||||
)
|
||||
}
|
||||
),
|
||||
// Other profiles tagged in the event...
|
||||
)
|
||||
|
||||
add(
|
||||
QEventTag.assemble(
|
||||
eventId = quotedNostrEvent.nostrEvent.id,
|
||||
relay = null, // TODO: Add relayHints...
|
||||
author = profile.publicKey
|
||||
)
|
||||
)
|
||||
notify(ptags)
|
||||
|
||||
// TODO: ZapForwarding support...
|
||||
|
||||
@@ -181,6 +181,7 @@ private fun TextNoteFeedItem(
|
||||
)
|
||||
}
|
||||
|
||||
// TODO: RichContent here...
|
||||
Text(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
text = nostrEvent.content,
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package ac.cord.auxiliary.compose.ui.composable.widgets.feed
|
||||
|
||||
import ac.cord.auxiliary.compose.database.model.intermdiate.LocalNostrEvent
|
||||
import androidx.compose.runtime.Composable
|
||||
import com.vitorpamplona.quartz.nip01Core.core.HexKey
|
||||
|
||||
@Composable
|
||||
fun FeedListItem(
|
||||
localNostrEvent: LocalNostrEvent,
|
||||
onNavigateToEvent: (HexKey) -> Unit
|
||||
) {
|
||||
localNostrEvent.ListView(
|
||||
onNavigateToEvent = onNavigateToEvent
|
||||
)
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
#Kotlin
|
||||
kotlin.code.style=official
|
||||
kotlin.daemon.jvmargs=-Xmx3072M
|
||||
kotlin.daemon.jvmargs=-Xmx12g
|
||||
|
||||
#Gradle
|
||||
org.gradle.jvmargs=-Xmx4096M -Dfile.encoding=UTF-8
|
||||
org.gradle.jvmargs=-Xmx8g -Dfile.encoding=UTF-8
|
||||
org.gradle.configuration-cache=true
|
||||
org.gradle.caching=true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user