From 801bd3f1062a603dd08f1e9431b8072ead7bf9fd Mon Sep 17 00:00:00 2001 From: Hampus Date: Mon, 5 Oct 2026 21:17:40 +0200 Subject: [PATCH] fix(app): cycle dms in sidebar order with the keyboard (#3233) --- fluxer_app/src/features/app/keybindings/KeybindManager.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fluxer_app/src/features/app/keybindings/KeybindManager.ts b/fluxer_app/src/features/app/keybindings/KeybindManager.ts index 60b14ebb5..1a58e2636 100644 --- a/fluxer_app/src/features/app/keybindings/KeybindManager.ts +++ b/fluxer_app/src/features/app/keybindings/KeybindManager.ts @@ -69,6 +69,7 @@ import {shouldUseKeyboardShortcutsOverlayFallbackFromEvent} from '@app/features/ import {jsKeyToUiohookKeycode} from '@app/features/input/utils/UiohookKeycodes'; import type {Message} from '@app/features/messaging/models/MessagingMessage'; import MessageFocus from '@app/features/messaging/state/MessageFocus'; +import {getSortedDmChannels} from '@app/features/messaging/utils/DmChannelUtils'; import * as NavigationCommands from '@app/features/navigation/commands/NavigationCommands'; import Navigation from '@app/features/navigation/state/Navigation'; import SelectedChannel from '@app/features/navigation/state/SelectedChannel'; @@ -374,7 +375,7 @@ class KeybindManager { } private cycleDirectMessageContext(direction: 1 | -1): void { - const dmChannels = Channels.dmChannels; + const dmChannels = getSortedDmChannels(Channels.dmChannels, Authentication.currentUserId); const slotCount = dmChannels.length + 1; const currentChannelId = this.currentChannelId; const currentIndex = currentChannelId ? dmChannels.findIndex((channel) => channel.id === currentChannelId) + 1 : 0;