diff --git a/conference.js b/conference.js index fd92ebc464..d7670f9df8 100644 --- a/conference.js +++ b/conference.js @@ -287,7 +287,7 @@ class ConferenceConnector { }, descriptionKey: 'dialog.reservationErrorMsg', titleKey: 'dialog.reservationError' - }, NOTIFICATION_TIMEOUT_TYPE.LONG)); + })); break; } @@ -295,7 +295,7 @@ class ConferenceConnector { APP.store.dispatch(showErrorNotification({ descriptionKey: 'dialog.gracefulShutdown', titleKey: 'dialog.serviceUnavailable' - }, NOTIFICATION_TIMEOUT_TYPE.LONG)); + })); break; // FIXME FOCUS_DISCONNECTED is a confusing event name. diff --git a/react/features/base/conference/middleware.any.ts b/react/features/base/conference/middleware.any.ts index 191016f92d..faf394efb4 100644 --- a/react/features/base/conference/middleware.any.ts +++ b/react/features/base/conference/middleware.any.ts @@ -177,7 +177,7 @@ function _conferenceFailed({ dispatch, getState }: IStore, next: Function, actio dispatch(showErrorNotification({ description: 'Restart initiated because of a bridge failure', titleKey: 'dialog.sessionRestarted' - }, NOTIFICATION_TIMEOUT_TYPE.LONG)); + })); } break; @@ -190,7 +190,7 @@ function _conferenceFailed({ dispatch, getState }: IStore, next: Function, actio descriptionArguments: { msg }, descriptionKey: msg ? 'dialog.connectErrorWithMsg' : 'dialog.connectError', titleKey: 'connection.CONNFAIL' - }, NOTIFICATION_TIMEOUT_TYPE.LONG)); + })); break; } @@ -199,7 +199,7 @@ function _conferenceFailed({ dispatch, getState }: IStore, next: Function, actio hideErrorSupportLink: true, descriptionKey: 'dialog.maxUsersLimitReached', titleKey: 'dialog.maxUsersLimitReachedTitle' - }, NOTIFICATION_TIMEOUT_TYPE.LONG)); + })); // In case of max users(it can be from a visitor node), let's restore // oldConfig if any as we will be back to the main prosody. @@ -236,7 +236,7 @@ function _conferenceFailed({ dispatch, getState }: IStore, next: Function, actio descriptionKey, hideErrorSupportLink: true, titleKey - }, NOTIFICATION_TIMEOUT_TYPE.STICKY)); + })); sendAnalytics(createNotAllowedErrorEvent(type, msg)); @@ -416,7 +416,7 @@ function _connectionFailed({ dispatch, getState }: IStore, next: Function, actio descriptionKey: errors ? 'dialog.tokenAuthFailedWithReasons' : 'dialog.tokenAuthFailed', descriptionArguments: { reason: errors }, titleKey: 'dialog.tokenAuthFailedTitle' - }, NOTIFICATION_TIMEOUT_TYPE.STICKY)); + })); } } diff --git a/react/features/base/tracks/actions.any.ts b/react/features/base/tracks/actions.any.ts index e6a335bcb7..cde9700814 100644 --- a/react/features/base/tracks/actions.any.ts +++ b/react/features/base/tracks/actions.any.ts @@ -291,7 +291,7 @@ export function showNoDataFromSourceVideoError(jitsiTrack: any) { const notificationAction = dispatch(showErrorNotification({ descriptionKey: 'dialog.cameraNotSendingData', titleKey: 'dialog.cameraNotSendingDataTitle' - }, NOTIFICATION_TIMEOUT_TYPE.LONG)); + })); notificationInfo = { uid: notificationAction?.uid diff --git a/react/features/base/tracks/actions.web.ts b/react/features/base/tracks/actions.web.ts index 25320aa500..6377067e30 100644 --- a/react/features/base/tracks/actions.web.ts +++ b/react/features/base/tracks/actions.web.ts @@ -157,7 +157,7 @@ async function _toggleScreenSharing( try { tracks = await createLocalTracksF(options) as any[]; } catch (error) { - dispatch(handleScreenSharingError(error, NOTIFICATION_TIMEOUT_TYPE.MEDIUM)); + dispatch(handleScreenSharingError(error)); throw error; } @@ -171,7 +171,7 @@ async function _toggleScreenSharing( desktopVideoTrack.dispose(); if (!desktopAudioTrack) { - dispatch(handleScreenSharingError(AUDIO_ONLY_SCREEN_SHARE_NO_TRACK, NOTIFICATION_TIMEOUT_TYPE.MEDIUM)); + dispatch(handleScreenSharingError(AUDIO_ONLY_SCREEN_SHARE_NO_TRACK)); throw new Error(AUDIO_ONLY_SCREEN_SHARE_NO_TRACK); } @@ -457,7 +457,7 @@ export function displayErrorsForCreateInitialLocalTracks(errors: IInitialTracksE } = errors; if (screenSharingError) { - dispatch(handleScreenSharingError(screenSharingError, NOTIFICATION_TIMEOUT_TYPE.LONG)); + dispatch(handleScreenSharingError(screenSharingError)); } if (audioOnlyError || videoOnlyError) { if (audioOnlyError) { @@ -476,12 +476,10 @@ export function displayErrorsForCreateInitialLocalTracks(errors: IInitialTracksE * * @private * @param {Error | AUDIO_ONLY_SCREEN_SHARE_NO_TRACK} error - The error. - * @param {NOTIFICATION_TIMEOUT_TYPE} timeout - The time for showing the notification. * @returns {Function} */ export function handleScreenSharingError( - error: Error | AUDIO_ONLY_SCREEN_SHARE_NO_TRACK, - timeout: NOTIFICATION_TIMEOUT_TYPE) { + error: Error | AUDIO_ONLY_SCREEN_SHARE_NO_TRACK) { return (dispatch: IStore['dispatch']) => { logger.error('failed to share local desktop', error); @@ -508,6 +506,6 @@ export function handleScreenSharingError( dispatch(showErrorNotification({ descriptionKey, titleKey - }, timeout)); + })); }; } diff --git a/react/features/invite/components/add-people-dialog/AbstractAddPeopleDialog.tsx b/react/features/invite/components/add-people-dialog/AbstractAddPeopleDialog.tsx index 98b0fd8f82..fa66da985e 100644 --- a/react/features/invite/components/add-people-dialog/AbstractAddPeopleDialog.tsx +++ b/react/features/invite/components/add-people-dialog/AbstractAddPeopleDialog.tsx @@ -190,7 +190,7 @@ export default class AbstractAddPeopleDialog
}));
dispatch(showErrorNotification({
titleKey: 'addPeople.failedToAdd'
- }, NOTIFICATION_TIMEOUT_TYPE.MEDIUM));
+ }));
} else if (!_callFlowsEnabled) {
const invitedCount = invitees.length;
let notificationProps: INotificationProps | undefined;
diff --git a/react/features/noise-suppression/actions.ts b/react/features/noise-suppression/actions.ts
index 40ff51dd52..e2e6aafd6a 100644
--- a/react/features/noise-suppression/actions.ts
+++ b/react/features/noise-suppression/actions.ts
@@ -1,7 +1,6 @@
import { IStore } from '../app/types';
import { getLocalJitsiAudioTrack } from '../base/tracks/functions';
import { showErrorNotification } from '../notifications/actions';
-import { NOTIFICATION_TIMEOUT_TYPE } from '../notifications/constants';
import { NoiseSuppressionEffect } from '../stream-effects/noise-suppression/NoiseSuppressionEffect';
import { SET_NOISE_SUPPRESSION_ENABLED } from './actionTypes';
@@ -93,7 +92,7 @@ export function setNoiseSuppressionEnabled(enabled: boolean): any {
dispatch(showErrorNotification({
titleKey: 'notify.noiseSuppressionFailedTitle'
- }, NOTIFICATION_TIMEOUT_TYPE.MEDIUM));
+ }));
}
};
}
diff --git a/react/features/notifications/actions.ts b/react/features/notifications/actions.ts
index a92752ec83..adebd8281c 100644
--- a/react/features/notifications/actions.ts
+++ b/react/features/notifications/actions.ts
@@ -97,7 +97,7 @@ export function setNotificationsEnabled(enabled: boolean) {
* @param {string} type - Notification type.
* @returns {Object}
*/
-export function showErrorNotification(props: INotificationProps, type?: string) {
+export function showErrorNotification(props: INotificationProps, type = NOTIFICATION_TIMEOUT_TYPE.STICKY) {
return showNotification({
...props,
appearance: NOTIFICATION_TYPE.ERROR
diff --git a/react/features/old-client-notification/middleware.tsx b/react/features/old-client-notification/middleware.tsx
index 1b97763ee6..48da757f93 100644
--- a/react/features/old-client-notification/middleware.tsx
+++ b/react/features/old-client-notification/middleware.tsx
@@ -5,7 +5,6 @@ import { IStore } from '../app/types';
import { APP_WILL_MOUNT } from '../base/app/actionTypes';
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
import { showErrorNotification } from '../notifications/actions';
-import { NOTIFICATION_TIMEOUT_TYPE } from '../notifications/constants';
import OldElectronAPPNotificationDescription from './components/OldElectronAPPNotificationDescription';
import { isOldJitsiMeetElectronApp } from './functions';
@@ -35,7 +34,7 @@ function _appWillMount(store: IStore, next: Function, action: AnyAction) {
dispatch(showErrorNotification({
titleKey: 'notify.OldElectronAPPTitle',
description: