fix(dashboard): throttle events to update with Home button

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
This commit is contained in:
Maksim Sukharev
2025-06-30 10:15:14 +02:00
parent 81f4642160
commit cfb43e7ddf

View File

@ -328,6 +328,8 @@ const FILTER_LABELS = {
default: '',
}
let actualizeDataTimeout = null
export default {
name: 'LeftSidebar',
@ -956,6 +958,14 @@ export default {
},
refreshTalkDashboard() {
// Throttle click and keyboard events
if (actualizeDataTimeout) {
return
}
actualizeDataTimeout = setTimeout(() => {
actualizeDataTimeout = null
}, 5_000)
if (this.isInDashboard) {
EventBus.emit('refresh-talk-dashboard')
}