Skip to content

Commit

Permalink
Correctly displaying/hiding pictures in Chat Compose
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorpamplona committed Aug 12, 2023
1 parent f2b727c commit 7990375
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,17 @@ fun NormalChatNote(
) {
val drawAuthorInfo by remember {
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
}
}
}

Expand Down

0 comments on commit 7990375

Please sign in to comment.