Change of approach for the debounce
This commit is contained in:
parent
f255f4b69e
commit
6cf3cd47fb
@ -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,
|
||||
};
|
||||
|
@ -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(
|
||||
<FormattedMessage
|
||||
|
Loading…
Reference in New Issue
Block a user