ref(notifications): convert Thank You message to a notification
This commit is contained in:
parent
7341c7bf84
commit
f3b5ed2ef4
|
@ -62,6 +62,7 @@ import {
|
||||||
setVideoAvailable,
|
setVideoAvailable,
|
||||||
setVideoMuted
|
setVideoMuted
|
||||||
} from './react/features/base/media';
|
} from './react/features/base/media';
|
||||||
|
import { showNotification } from './react/features/notifications';
|
||||||
import {
|
import {
|
||||||
dominantSpeakerChanged,
|
dominantSpeakerChanged,
|
||||||
getAvatarURLByParticipantId,
|
getAvatarURLByParticipantId,
|
||||||
|
@ -203,7 +204,7 @@ function muteLocalVideo(muted) {
|
||||||
*
|
*
|
||||||
* @param {object} options used to decide which particular close page to show
|
* @param {object} options used to decide which particular close page to show
|
||||||
* or if close page is disabled, whether we should show the thankyou dialog
|
* or if close page is disabled, whether we should show the thankyou dialog
|
||||||
* @param {boolean} options.thankYouDialogVisible - whether we should
|
* @param {boolean} options.showThankYou - whether we should
|
||||||
* show thank you dialog
|
* show thank you dialog
|
||||||
* @param {boolean} options.feedbackSubmitted - whether feedback was submitted
|
* @param {boolean} options.feedbackSubmitted - whether feedback was submitted
|
||||||
*/
|
*/
|
||||||
|
@ -222,9 +223,11 @@ function maybeRedirectToWelcomePage(options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// else: show thankYou dialog only if there is no feedback
|
// else: show thankYou dialog only if there is no feedback
|
||||||
if (options.thankYouDialogVisible) {
|
if (options.showThankYou) {
|
||||||
APP.UI.messageHandler.openMessageDialog(
|
APP.store.dispatch(showNotification({
|
||||||
null, 'dialog.thankYou', { appName: interfaceConfig.APP_NAME });
|
titleArguments: { appName: interfaceConfig.APP_NAME },
|
||||||
|
titleKey: 'dialog.thankYou'
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
// if Welcome page is enabled redirect to welcome page after 3 sec.
|
// if Welcome page is enabled redirect to welcome page after 3 sec.
|
||||||
|
|
|
@ -43,7 +43,7 @@ export function cancelFeedback(score: number, message: string) {
|
||||||
export function maybeOpenFeedbackDialog(conference: Object) {
|
export function maybeOpenFeedbackDialog(conference: Object) {
|
||||||
type R = {
|
type R = {
|
||||||
feedbackSubmitted: boolean,
|
feedbackSubmitted: boolean,
|
||||||
thankYouDialogVisible: boolean
|
showThankYou: boolean
|
||||||
};
|
};
|
||||||
|
|
||||||
return (dispatch: Dispatch<*>, getState: Function): Promise<R> => {
|
return (dispatch: Dispatch<*>, getState: Function): Promise<R> => {
|
||||||
|
@ -61,7 +61,7 @@ export function maybeOpenFeedbackDialog(conference: Object) {
|
||||||
|
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
feedbackSubmitted: true,
|
feedbackSubmitted: true,
|
||||||
thankYouDialogVisible: true
|
showThankYou: true
|
||||||
});
|
});
|
||||||
} else if (conference.isCallstatsEnabled()) {
|
} else if (conference.isCallstatsEnabled()) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
@ -70,18 +70,18 @@ export function maybeOpenFeedbackDialog(conference: Object) {
|
||||||
|
|
||||||
resolve({
|
resolve({
|
||||||
feedbackSubmitted: submitted,
|
feedbackSubmitted: submitted,
|
||||||
thankYouDialogVisible: false
|
showThankYou: false
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the feedback functionality isn't enabled we show a "thank you"
|
// If the feedback functionality isn't enabled we show a "thank you"
|
||||||
// dialog. Signaling it (true), so the caller of requestFeedback can act
|
// message. Signaling it (true), so the caller of requestFeedback can
|
||||||
// on it.
|
// act on it.
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
feedbackSubmitted: false,
|
feedbackSubmitted: false,
|
||||||
thankYouDialogVisible: true
|
showThankYou: true
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue