fix(notifications) don't show self view notifications if already one is active

This commit is contained in:
bogdandarie 2022-10-17 10:03:06 +03:00 committed by GitHub
parent b558d7936c
commit 495957104c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -56,6 +56,13 @@ export const NOTIFICATION_ICON = {
PARTICIPANTS: 'participants'
};
/**
* The identifier of the disable self view notification.
*
* @type {string}
*/
export const DISABLE_SELF_VIEW_NOTIFICATION_ID = 'DISABLE_SELF_VIEW_NOTIFICATION_ID';
/**
* The identifier of the lobby notification.
*

View File

@ -1,6 +1,6 @@
import { MiddlewareRegistry } from '../base/redux';
import { SETTINGS_UPDATED, getHideSelfView } from '../base/settings';
import { NOTIFICATION_TIMEOUT_TYPE, showNotification } from '../notifications';
import { DISABLE_SELF_VIEW_NOTIFICATION_ID, NOTIFICATION_TIMEOUT_TYPE, showNotification } from '../notifications';
import { openSettingsDialog } from './actions';
import { SETTINGS_TABS } from './constants';
@ -16,6 +16,7 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
if (newValue !== oldValue && newValue) {
dispatch(showNotification({
uid: DISABLE_SELF_VIEW_NOTIFICATION_ID,
titleKey: 'notify.selfViewTitle',
customActionNameKey: [ 'settings.title' ],
customActionHandler: [ () =>