diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-08-29 01:14:07 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-08-29 01:14:07 -0400 |
commit | 299ecc71d980904ad7ffaf6d44254da71f948666 (patch) | |
tree | 26d0ccd90d1299ea87219b725082ed2c021f2ce0 /windows | |
parent | 4e7ae1af1d5c39591e8dbfe1742b42a4e578fff2 (diff) | |
download | abaddon-portaudio-299ecc71d980904ad7ffaf6d44254da71f948666.tar.gz abaddon-portaudio-299ecc71d980904ad7ffaf6d44254da71f948666.zip |
add MESSAGE_DELETE handling
Diffstat (limited to 'windows')
-rw-r--r-- | windows/mainwindow.cpp | 5 | ||||
-rw-r--r-- | windows/mainwindow.hpp | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/windows/mainwindow.cpp b/windows/mainwindow.cpp index 743b2a2..24f39f3 100644 --- a/windows/mainwindow.cpp +++ b/windows/mainwindow.cpp @@ -110,6 +110,11 @@ void MainWindow::UpdateChatNewMessage(Snowflake id) { m_chat.AddNewMessage(id); } +void MainWindow::UpdateChatMessageDeleted(Snowflake id, Snowflake channel_id) { + if (channel_id == GetChatActiveChannel()) + m_chat.DeleteMessage(id); +} + void MainWindow::UpdateChatPrependHistory(const std::vector<MessageData> &msgs) { m_chat.AddNewHistory(msgs); } diff --git a/windows/mainwindow.hpp b/windows/mainwindow.hpp index 256e930..10d897c 100644 --- a/windows/mainwindow.hpp +++ b/windows/mainwindow.hpp @@ -16,6 +16,7 @@ public: void UpdateChatActiveChannel(Snowflake id); Snowflake GetChatActiveChannel() const; void UpdateChatNewMessage(Snowflake id); + void UpdateChatMessageDeleted(Snowflake id, Snowflake channel_id); void UpdateChatPrependHistory(const std::vector<MessageData> &msgs); protected: |