From f3769ca30164b28538294c27dd3fdec672638631 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Fri, 3 Sep 2021 03:49:25 -0400 Subject: remove archived threads from channel list on sync this probably doesnt do anything but i added it while trying to fix something and it might work sometime i dont know --- components/channels.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'components/channels.cpp') diff --git a/components/channels.cpp b/components/channels.cpp index 4a3a8f1..98604d7 100644 --- a/components/channels.cpp +++ b/components/channels.cpp @@ -337,6 +337,14 @@ void ChannelList::OnThreadListSync(const ThreadListSyncData &data) { m_model->erase(iter); } } + + // delete all archived threads + for (auto thread : data.Threads) { + if (thread.ThreadMetadata->IsArchived) { + if (auto iter = GetIteratorForChannelFromID(thread.ID)) + m_model->erase(iter); + } + } } void ChannelList::DeleteThreadRow(Snowflake id) { -- cgit v1.2.3