summaryrefslogtreecommitdiff
path: root/src/components/chatlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/chatlist.cpp')
-rw-r--r--src/components/chatlist.cpp11
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) {