mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-19 20:11:59 +03:00
update pins window on pin/unpin
This commit is contained in:
@@ -21,9 +21,19 @@ PinnedWindow::PinnedWindow(const ChannelData &data)
|
||||
m_chat.SetActiveChannel(ChannelID);
|
||||
m_chat.SetUsePinnedMenu();
|
||||
|
||||
Abaddon::Get().GetDiscordClient().signal_message_pinned().connect(sigc::mem_fun(*this, &PinnedWindow::OnMessagePinned));
|
||||
Abaddon::Get().GetDiscordClient().signal_message_unpinned().connect(sigc::mem_fun(*this, &PinnedWindow::OnMessageUnpinned));
|
||||
FetchPinned();
|
||||
}
|
||||
|
||||
void PinnedWindow::OnMessagePinned(const Message &msg) {
|
||||
FetchPinned();
|
||||
}
|
||||
|
||||
void PinnedWindow::OnMessageUnpinned(const Message &msg) {
|
||||
m_chat.ActuallyRemoveMessage(msg.ID);
|
||||
}
|
||||
|
||||
void PinnedWindow::FetchPinned() {
|
||||
Abaddon::Get().GetDiscordClient().FetchPinned(ChannelID, sigc::mem_fun(*this, &PinnedWindow::OnFetchedPinned));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user