From 8184f4e775501206b572accd114bb3ac0b270948 Mon Sep 17 00:00:00 2001 From: DorraJaouad Date: Wed, 19 Jun 2024 18:50:32 +0200 Subject: [PATCH] fix(CallTime): stop showing hint for late call joiners. Signed-off-by: DorraJaouad --- src/components/TopBar/CallTime.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/TopBar/CallTime.vue b/src/components/TopBar/CallTime.vue index eab5dd04925..f1a098bdc59 100644 --- a/src/components/TopBar/CallTime.vue +++ b/src/components/TopBar/CallTime.vue @@ -70,6 +70,8 @@ import NcPopover from '@nextcloud/vue/dist/Components/NcPopover.js' import { CALL } from '../../constants.js' import { formattedTime } from '../../utils/formattedTime.ts' +const ONE_HOUR_MS = 60 * 60 * 1000 + export default { name: 'CallTime', @@ -97,7 +99,6 @@ export default { showPopover: false, isCallDurationHintShown: false, timer: null, - untilCallDurationHintShown: null, } }, @@ -154,11 +155,8 @@ export default { watch: { callTime(value) { - if (value && !this.untilCallDurationHintShown) { - this.untilCallDurationHintShown = (1000 * 60 * 60) - value + 1000 - setTimeout(() => { - this.showCallDurationHint() - }, this.untilCallDurationHintShown) + if (value > ONE_HOUR_MS && value < (ONE_HOUR_MS + 10000) && !this.isCallDurationHintShown) { + this.showCallDurationHint() } }, },