mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-06 22:53:34 +02:00
Updates the isHidden function to the same version the NoteCompose uses.
This commit is contained in:
@@ -125,15 +125,9 @@ fun CheckHiddenChatMessage(
|
|||||||
nav: (String) -> Unit,
|
nav: (String) -> Unit,
|
||||||
onWantsToReply: (Note) -> Unit
|
onWantsToReply: (Note) -> Unit
|
||||||
) {
|
) {
|
||||||
val accountState by accountViewModel.accountLiveData.observeAsState()
|
val isHidden by accountViewModel.account.liveHiddenUsers.map {
|
||||||
|
baseNote.isHiddenFor(it)
|
||||||
val isHidden by remember(accountState) {
|
}.observeAsState(accountViewModel.isNoteHidden(baseNote))
|
||||||
derivedStateOf {
|
|
||||||
val isSensitive = baseNote.event?.isSensitive() ?: false
|
|
||||||
|
|
||||||
accountState?.account?.isHidden(baseNote.author!!) == true || (isSensitive && accountState?.account?.showSensitiveContent == false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isHidden) {
|
if (!isHidden) {
|
||||||
LoadedChatMessageCompose(
|
LoadedChatMessageCompose(
|
||||||
|
Reference in New Issue
Block a user