Fix ghost notifications on closed DMs.

Fix link warning not closing on open.
This commit is contained in:
Paul 2021-08-30 13:26:19 +01:00
parent 44fdee1214
commit 0ca99ddceb
2 changed files with 7 additions and 3 deletions

View file

@ -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++;
}

View file

@ -15,7 +15,10 @@ export function ExternalLinkModal({ onClose, link }: Props) {
title={<Text id={"app.special.modals.external_links.title"} />}
actions={[
{
onClick: ()=>{window.open(link, "_blank");},
onClick: () => {
window.open(link, "_blank");
onClose();
},
confirmation: true,
contrast: true,
accent: true,