diff --git a/desktop/src/app/navigation/useDeferredSidebarNavigation.ts b/desktop/src/app/navigation/useDeferredSidebarNavigation.ts index 6a7a7a279..d9e67e186 100644 --- a/desktop/src/app/navigation/useDeferredSidebarNavigation.ts +++ b/desktop/src/app/navigation/useDeferredSidebarNavigation.ts @@ -77,6 +77,10 @@ export function useDeferredSidebarNavigation({ const selectDeferred = React.useCallback( (channelId: string) => { + if (channelId === selectedChannelId) { + selectChannel(channelId); + return; + } dispatchNavigationIntent(); cancel(); const generation = generationRef.current; @@ -118,7 +122,7 @@ export function useDeferredSidebarNavigation({ }); }); }, - [cancel, selectChannel], + [cancel, selectChannel, selectedChannelId], ); return { pendingChannelId, selectDeferred };