Decrypting notes since Notifications can also show Private Message Likes

This commit is contained in:
Vitor Pamplona 2023-02-28 16:51:35 -05:00
parent ddc1e9fd69
commit f68f32f6e5

View File

@ -45,6 +45,7 @@ import com.vitorpamplona.amethyst.ui.components.TranslateableRichTextViewer
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.theme.Following
import kotlin.time.ExperimentalTime
import nostr.postr.events.PrivateDmEvent
import nostr.postr.events.TextNoteEvent
@OptIn(ExperimentalFoundationApi::class)
@ -336,7 +337,8 @@ fun NoteCompose(
thickness = 0.25.dp
)
} else {
val eventContent = noteEvent.content
val eventContent = accountViewModel.decrypt(note)
val canPreview = note.author == account.userProfile()
|| (note.author?.let { account.userProfile().isFollowing(it) } ?: true )
|| !noteForReports.hasAnyReports()