diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-06-23 02:09:07 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-06-23 02:09:07 -0400 |
commit | 41d60e5e907aa0d6f625796e15c6317074e2af7d (patch) | |
tree | 88286b7248931b3394be5813db01358701b5c77a /components | |
parent | 7db2675087a563ec82574937759137fa2e57298c (diff) | |
download | abaddon-portaudio-41d60e5e907aa0d6f625796e15c6317074e2af7d.tar.gz abaddon-portaudio-41d60e5e907aa0d6f625796e15c6317074e2af7d.zip |
update pins window on pin/unpin
Diffstat (limited to 'components')
-rw-r--r-- | components/chatlist.cpp | 6 | ||||
-rw-r--r-- | components/chatlist.hpp | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/components/chatlist.cpp b/components/chatlist.cpp index 57d797f..8fd28a5 100644 --- a/components/chatlist.cpp +++ b/components/chatlist.cpp @@ -280,6 +280,12 @@ void ChatList::SetUsePinnedMenu() { m_use_pinned_menu = true; } +void ChatList::ActuallyRemoveMessage(Snowflake id) { + auto it = m_id_to_widget.find(id); + if (it != m_id_to_widget.end()) + RemoveMessageAndHeader(it->second); +} + void ChatList::OnScrollEdgeOvershot(Gtk::PositionType pos) { if (pos == Gtk::POS_TOP) m_signal_action_chat_load_history.emit(m_active_channel); diff --git a/components/chatlist.hpp b/components/chatlist.hpp index 2f63900..7f9dab7 100644 --- a/components/chatlist.hpp +++ b/components/chatlist.hpp @@ -22,6 +22,7 @@ public: std::vector<Snowflake> GetRecentAuthors(); void SetSeparateAll(bool separate); void SetUsePinnedMenu(); // i think i need a better way to do menus + void ActuallyRemoveMessage(Snowflake id); // perhaps not the best method name private: void OnScrollEdgeOvershot(Gtk::PositionType pos); |