summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-02-15 02:17:23 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2021-02-15 02:17:23 -0500
commit14138ca568a8ca43620b0af364e09002ec01c52c (patch)
tree93f9721d64972f99008a8632471f5ecdea6f399f /components
parent8e972e1334f51512d4e374cca611abfa0753d1f1 (diff)
downloadabaddon-portaudio-14138ca568a8ca43620b0af364e09002ec01c52c.tar.gz
abaddon-portaudio-14138ca568a8ca43620b0af364e09002ec01c52c.zip
handle channel delete for dms
Diffstat (limited to 'components')
-rw-r--r--components/channels.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/channels.cpp b/components/channels.cpp
index cd5fee9..70b2a3a 100644
--- a/components/channels.cpp
+++ b/components/channels.cpp
@@ -327,7 +327,10 @@ void ChannelList::UpdateRemoveGuild(Snowflake id) {
void ChannelList::UpdateRemoveChannel(Snowflake id) {
auto it = m_id_to_row.find(id);
- if (it == m_id_to_row.end()) return;
+ if (it == m_id_to_row.end()) {
+ it = m_dm_id_to_row.find(id);
+ if (it == m_dm_id_to_row.end()) return;
+ }
auto row = dynamic_cast<ChannelListRow *>(it->second);
if (row == nullptr) return;
DeleteRow(row);