Skip to content

Commit

Permalink
sidebar-chat-row: Support sticker message type in last message label
Browse files Browse the repository at this point in the history
  • Loading branch information
melix99 committed Sep 13, 2021
1 parent a4c2643 commit 0bbdb19
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/session/sidebar/chat_row.rs
Expand Up @@ -223,9 +223,12 @@ impl ChatRow {

fn stringify_message(message: Message) -> String {
let text_content = match message.content().0 {
MessageContent::MessageText(content) => {
MessageContent::MessageText(data) => {
// The alpha value should be kept in sync with Adwaita's dim-label alpha value
format!("<span alpha=\"55%\">{}</span>", escape(&content.text.text))
format!("<span alpha=\"55%\">{}</span>", escape(&data.text.text))
}
MessageContent::MessageSticker(data) => {
format!("{} {}", data.sticker.emoji, gettext("Sticker"))
}
_ => gettext("Unsupported message"),
};
Expand Down

0 comments on commit 0bbdb19

Please sign in to comment.