diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-10-26 19:54:58 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-10-26 19:54:58 -0400 |
commit | 399d073a77e20ec79be6c8fe27164f56c7994366 (patch) | |
tree | d84b267c9ef38f5926a24c8ed80a650fa08bbfaa /src/components | |
parent | 2d9988b1be556acb1fb45d6dea04d0b9f3f820bc (diff) | |
parent | 163749e607c0921e8a4f043807af57ea7c8202ea (diff) | |
download | abaddon-portaudio-399d073a77e20ec79be6c8fe27164f56c7994366.tar.gz abaddon-portaudio-399d073a77e20ec79be6c8fe27164f56c7994366.zip |
Merge branch 'master' of https://github.com/uowuo/abaddon
Diffstat (limited to 'src/components')
-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) { |