Add mentioned profiles on quoted/reposted/inreply to
This commit is contained in:
1 parent
a5e5bd25ae
commit
755e91bbd5
5 files changed
+22
-22
No files matched your search
+7
-7
@@ -1,6 +1,7 @@
|
||||
package ac.cord.auxiliary.compose.database.model.intermdiate
|
||||
|
||||
import ac.cord.auxiliary.compose.database.model.InReplyToRelation
|
||||
import ac.cord.auxiliary.compose.database.model.Mention
|
||||
import ac.cord.auxiliary.compose.database.model.NostrEvent
|
||||
import ac.cord.auxiliary.compose.database.model.Profile
|
||||
import ac.cord.auxiliary.compose.database.model.QuotedRelation
|
||||
@@ -37,13 +38,12 @@ data class LocalInReplyToNostrEvent(
|
||||
)
|
||||
val profile: Profile?,
|
||||
|
||||
// TODO: Figure out if we want to add the root of the reply...
|
||||
// @Relation(
|
||||
// entity = Mention::class,
|
||||
// parentColumn = "id",
|
||||
// entityColumn = "nostrEventId",
|
||||
// )
|
||||
// val mentionedProfiles: List<LocalMention?> = emptyList(),
|
||||
@Relation(
|
||||
entity = Mention::class,
|
||||
parentColumn = "inReplyToNostrEventId",
|
||||
entityColumn = "nostrEventId",
|
||||
)
|
||||
val mentionedProfiles: List<LocalMention?> = emptyList(),
|
||||
) {
|
||||
@Composable
|
||||
fun RenderNotePreview() {
|
||||
|
||||
+7
-6
@@ -1,5 +1,6 @@
|
||||
package ac.cord.auxiliary.compose.database.model.intermdiate
|
||||
|
||||
import ac.cord.auxiliary.compose.database.model.Mention
|
||||
import ac.cord.auxiliary.compose.database.model.NostrEvent
|
||||
import ac.cord.auxiliary.compose.database.model.Profile
|
||||
import ac.cord.auxiliary.compose.database.model.QuotedRelation
|
||||
@@ -36,12 +37,12 @@ data class LocalQuotedNostrEvent(
|
||||
)
|
||||
val profile: Profile?,
|
||||
|
||||
// @Relation(
|
||||
// entity = Mention::class,
|
||||
// parentColumn = "id",
|
||||
// entityColumn = "nostrEventId",
|
||||
// )
|
||||
// val mentionedProfiles: List<LocalMention?> = emptyList(),
|
||||
@Relation(
|
||||
entity = Mention::class,
|
||||
parentColumn = "quotedNostrEventId",
|
||||
entityColumn = "nostrEventId",
|
||||
)
|
||||
val mentionedProfiles: List<LocalMention?> = emptyList(),
|
||||
) {
|
||||
@Composable
|
||||
fun RenderNotePreview() {
|
||||
|
||||
+7
-6
@@ -1,5 +1,6 @@
|
||||
package ac.cord.auxiliary.compose.database.model.intermdiate
|
||||
|
||||
import ac.cord.auxiliary.compose.database.model.Mention
|
||||
import ac.cord.auxiliary.compose.database.model.NostrEvent
|
||||
import ac.cord.auxiliary.compose.database.model.Profile
|
||||
import ac.cord.auxiliary.compose.database.model.QuotedRelation
|
||||
@@ -37,12 +38,12 @@ data class LocalRepostedNostrEvent(
|
||||
)
|
||||
val profile: Profile?,
|
||||
|
||||
// @Relation(
|
||||
// entity = Mention::class,
|
||||
// parentColumn = "id",
|
||||
// entityColumn = "nostrEventId",
|
||||
// )
|
||||
// val mentionedProfiles: List<LocalMention?> = emptyList(),
|
||||
@Relation(
|
||||
entity = Mention::class,
|
||||
parentColumn = "repostedNostrEventId",
|
||||
entityColumn = "nostrEventId",
|
||||
)
|
||||
val mentionedProfiles: List<LocalMention?> = emptyList(),
|
||||
) {
|
||||
@Composable
|
||||
fun RenderNotePreview() {
|
||||
|
||||
-2
@@ -24,8 +24,6 @@ import androidx.compose.ui.unit.dp
|
||||
@Composable
|
||||
fun QuotedNote(
|
||||
localQuotedNostrEvent: LocalQuotedNostrEvent? = null,
|
||||
quotedProfile: Profile? = null,
|
||||
relayHints: List<String> = emptyList(),
|
||||
onNoteClick: ((String) -> Unit)? = null,
|
||||
noteActions: NoteActions? = null
|
||||
) {
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ fun LocalNostrEvent.ListView(
|
||||
profile = localRepostedNostrEvent.profile,
|
||||
localQuotedNostrEvent = null,
|
||||
localInReplyToNostrEvent = null,
|
||||
mentionedProfiles = emptyList(), // TODO: Add localReposted.mentionedProfiles...
|
||||
mentionedProfiles = localRepostedNostrEvent.mentionedProfiles,
|
||||
onNavigateToEvent = onNavigateToEvent
|
||||
)
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user