From 6cf3cd47fbb99408415163fea1189e311a765e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Wed, 28 Feb 2024 15:41:51 -0300 Subject: [PATCH] Change of approach for the debounce --- .../imports/ui/components/layout/service.js | 3 +-- .../imports/ui/components/notifications/container.jsx | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/layout/service.js b/bigbluebutton-html5/imports/ui/components/layout/service.js index 24c1ad0eaf..ebb1987853 100644 --- a/bigbluebutton-html5/imports/ui/components/layout/service.js +++ b/bigbluebutton-html5/imports/ui/components/layout/service.js @@ -1,5 +1,4 @@ import { makeCall } from '/imports/ui/services/api'; -import { debounce } from '/imports/utils/debounce'; const setPushLayout = (pushLayout) => { makeCall('setPushLayout', { pushLayout }); @@ -11,5 +10,5 @@ const setMeetingLayout = (options) => { export default { setPushLayout, - setMeetingLayout: debounce(setMeetingLayout, 1000), + setMeetingLayout, }; diff --git a/bigbluebutton-html5/imports/ui/components/notifications/container.jsx b/bigbluebutton-html5/imports/ui/components/notifications/container.jsx index a1e754bb2a..028ef3d39e 100644 --- a/bigbluebutton-html5/imports/ui/components/notifications/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/notifications/container.jsx @@ -22,6 +22,14 @@ export default injectIntl(withTracker(({ intl }) => { if (obj.messageId === 'app.notification.userLeavePushAlert') { return UserService.UserLeftMeetingAlert(obj); } + if (obj.messageId === 'app.layoutUpdate.label') { + const last = new Date(Session.get('lastLayoutUpdateNotification')); + const now = new Date(); + if (now - last < 1000) { + return {}; + } + Session.set('lastLayoutUpdateNotification', now); + } notify(