From 09ea74847930fb79a7b8442c3551f4f7e5887954 Mon Sep 17 00:00:00 2001 From: Hampus Date: Thu, 13 Aug 2026 21:10:41 +0200 Subject: [PATCH] fix(app): remove stale DM list gaps (#1583) --- .../src/features/app/components/layout/GuildsLayout.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fluxer_app/src/features/app/components/layout/GuildsLayout.tsx b/fluxer_app/src/features/app/components/layout/GuildsLayout.tsx index 7bf67e936..a139de73d 100644 --- a/fluxer_app/src/features/app/components/layout/GuildsLayout.tsx +++ b/fluxer_app/src/features/app/components/layout/GuildsLayout.tsx @@ -162,7 +162,12 @@ class DMChannelVisibilityController { } private projectVisibleChannels({currentChannels, unreadIds}: ProjectVisibleDMChannelsRequest): Array { - const leavingChannels = currentChannels.filter((channel) => !unreadIds.has(channel.id)); + const visibleChannelIds = new Set(this.orderedUnreadChannels.map(getChannelId)); + const leavingChannels = currentChannels.filter((channel) => { + if (unreadIds.has(channel.id) || visibleChannelIds.has(channel.id)) return false; + visibleChannelIds.add(channel.id); + return true; + }); for (const channel of leavingChannels) this.scheduleRemoval(channel.id); return [...this.orderedUnreadChannels, ...leavingChannels]; }