add MESSAGE_DELETE handling

This commit is contained in:
ouwou
2020-08-29 01:14:07 -04:00
parent 4e7ae1af1d
commit 299ecc71d9
12 changed files with 73 additions and 0 deletions

View File

@@ -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);
}

View File

@@ -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: