mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-04 18:02:39 +02:00
Correctly displaying/hiding pictures in Chat Compose
This commit is contained in:
@@ -227,7 +227,17 @@ fun NormalChatNote(
|
|||||||
) {
|
) {
|
||||||
val drawAuthorInfo by remember {
|
val drawAuthorInfo by remember {
|
||||||
derivedStateOf {
|
derivedStateOf {
|
||||||
note.event !is PrivateDmEvent && (innerQuote || !accountViewModel.isLoggedUser(note.author))
|
val noteEvent = note.event
|
||||||
|
if (accountViewModel.isLoggedUser(note.author)) {
|
||||||
|
false // never shows the user's pictures
|
||||||
|
} else if (noteEvent is PrivateDmEvent) {
|
||||||
|
false // one-on-one, never shows it.
|
||||||
|
} else if (noteEvent is ChatMessageEvent) {
|
||||||
|
// only shows in a group chat.
|
||||||
|
noteEvent.chatroomKey(accountViewModel.userProfile().pubkeyHex).users.size > 1
|
||||||
|
} else {
|
||||||
|
true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user