diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-10-27 01:38:17 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-10-27 01:38:17 -0400 |
commit | c35d8b4e2d9c70bd5ed99c06da40908bfe5cb0db (patch) | |
tree | 77cecbc9b3dc780fcb0f5405bd3c76a626132c1a /src/components/chatlist.cpp | |
parent | 09cfa864be6e706fd2576eee60a285d5f4431b04 (diff) | |
parent | 399d073a77e20ec79be6c8fe27164f56c7994366 (diff) | |
download | abaddon-portaudio-c35d8b4e2d9c70bd5ed99c06da40908bfe5cb0db.tar.gz abaddon-portaudio-c35d8b4e2d9c70bd5ed99c06da40908bfe5cb0db.zip |
Merge branch 'master' into classic-channels
Diffstat (limited to 'src/components/chatlist.cpp')
-rw-r--r-- | src/components/chatlist.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/components/chatlist.cpp b/src/components/chatlist.cpp index 4dde8a3..a656a43 100644 --- a/src/components/chatlist.cpp +++ b/src/components/chatlist.cpp @@ -187,8 +187,15 @@ void ChatList::DeleteMessage(Snowflake id) { if (widget == m_id_to_widget.end()) return; auto *x = dynamic_cast<ChatMessageItemContainer *>(widget->second); - if (x != nullptr) - x->UpdateAttributes(); + + if (x != nullptr) { + if (Abaddon::Get().GetSettings().ShowDeletedIndicator) { + x->UpdateAttributes(); + } else { + RemoveMessageAndHeader(x); + m_id_to_widget.erase(id); + } + } } void ChatList::RefetchMessage(Snowflake id) { |