fix(notifications) don't show self view notifications if already one is active
This commit is contained in:
parent
b558d7936c
commit
495957104c
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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: [ () =>
|
||||
|
|
Loading…
Reference in New Issue