Moves handling of thank you dialog.

Moves handling of thank you dialog out of the Promise that handles the feedback and just before we redirect to welcome page.
This commit is contained in:
damencho 2016-09-22 14:03:01 -05:00
parent 7eb85fe7aa
commit 415619021f
2 changed files with 16 additions and 9 deletions

View File

@ -202,8 +202,20 @@ function muteLocalVideo (muted) {
/**
* Check if the welcome page is enabled and redirects to it.
* If requested show a thank you dialog before that.
* @param {boolean} showThankYou whether we should show a thank you dialog
*/
function maybeRedirectToWelcomePage() {
function maybeRedirectToWelcomePage(showThankYou) {
if (showThankYou) {
APP.UI.messageHandler.openMessageDialog(
null, null, null,
APP.translation.translateString(
"dialog.thankYou", {appName:interfaceConfig.APP_NAME}
)
);
}
if (!config.enableWelcomePage) {
return;
}

View File

@ -1130,14 +1130,9 @@ UI.requestFeedback = function () {
}
} else {
// If the feedback functionality isn't enabled we show a thank
// you dialog.
messageHandler.openMessageDialog(
null, null, null,
APP.translation.translateString(
"dialog.thankYou", {appName:interfaceConfig.APP_NAME}
)
);
resolve();
// you dialog. Signaling it (true), so the caller
// of requestFeedback can act on it
resolve(true);
}
});
};