diff --git a/src/components/navigation/left/ServerListSidebar.tsx b/src/components/navigation/left/ServerListSidebar.tsx index a4fef41d..dee73e72 100644 --- a/src/components/navigation/left/ServerListSidebar.tsx +++ b/src/components/navigation/left/ServerListSidebar.tsx @@ -244,10 +244,11 @@ export const ServerListSidebar = observer(({ unreads, lastOpened }: Props) => { homeUnread = "unread"; alertCount += x.alertCount ?? 0; } + if ( x.channel?.channel_type === "DirectMessage" && - x.unread && - x.unread.length > 0 + x.channel.active && + x.unread ) alertCount++; } diff --git a/src/context/intermediate/modals/ExternalLinkPrompt.tsx b/src/context/intermediate/modals/ExternalLinkPrompt.tsx index 04fecfcf..b0f5e6df 100644 --- a/src/context/intermediate/modals/ExternalLinkPrompt.tsx +++ b/src/context/intermediate/modals/ExternalLinkPrompt.tsx @@ -15,7 +15,10 @@ export function ExternalLinkModal({ onClose, link }: Props) { title={} actions={[ { - onClick: ()=>{window.open(link, "_blank");}, + onClick: () => { + window.open(link, "_blank"); + onClose(); + }, confirmation: true, contrast: true, accent: true,