Skip to content

Commit

Permalink
Merge pull request #12546 from nextcloud/fix/call_time_hint
Browse files Browse the repository at this point in the history
fix(CallTime): stop showing hint for participants who joined after 1 hour.
  • Loading branch information
DorraJaouad authored Jun 19, 2024
2 parents 807578b + 8184f4e commit 67a27b3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/components/TopBar/CallTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',

Expand Down Expand Up @@ -97,7 +99,6 @@ export default {
showPopover: false,
isCallDurationHintShown: false,
timer: null,
untilCallDurationHintShown: null,
}
},

Expand Down Expand Up @@ -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()
}
},
},
Expand Down

0 comments on commit 67a27b3

Please sign in to comment.