From 8144d758aef7f96d69ad15b4009270582b76450b Mon Sep 17 00:00:00 2001 From: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com> Date: Thu, 17 Dec 2020 17:13:00 -0600 Subject: [PATCH] Hide direct call notification when window is active --- ts/state/ducks/calling.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ts/state/ducks/calling.ts b/ts/state/ducks/calling.ts index 0b57568009..fba6f98644 100644 --- a/ts/state/ducks/calling.ts +++ b/ts/state/ducks/calling.ts @@ -468,8 +468,9 @@ async function showCallNotification( title: string, isVideoCall: boolean ): Promise { - const canNotify = await window.getCallSystemNotification(); - if (!canNotify) { + const shouldNotify = + !window.isActive() && (await window.getCallSystemNotification()); + if (!shouldNotify) { return; } notify({