Renames variables.

This commit is contained in:
damencho 2016-11-01 14:46:47 -05:00
parent f28311a2ce
commit ae01275729
2 changed files with 13 additions and 11 deletions

View File

@ -185,14 +185,15 @@ function muteLocalVideo (muted) {
* If we have a close page enabled, redirect to it without
* showing any other dialog.
*
* @param {object} data Feedback data
* @param {boolean} data.showThankYou - whether we should show thank you dialog
* @param {boolean} data.feedbackSubmitted - whether feedback was submitted
* @param {object} options Feedback data
* @param {boolean} options.thankYouDialogVisible - whether we should
* show thank you dialog
* @param {boolean} options.feedbackSubmitted - whether feedback was submitted
*/
function maybeRedirectToWelcomePage(data) {
function maybeRedirectToWelcomePage(options) {
// if close page is enabled redirect to it, without further action
if (config.enableClosePage) {
if (data.feedbackSubmitted)
if (options.feedbackSubmitted)
window.location.pathname = "close.html";
else
window.location.pathname = "close2.html";
@ -200,7 +201,7 @@ function maybeRedirectToWelcomePage(data) {
}
// else: show thankYou dialog only if there is no feedback
if (data.showThankYou)
if (options.thankYouDialogVisible)
APP.UI.messageHandler.openMessageDialog(
null, "dialog.thankYou", {appName:interfaceConfig.APP_NAME});

View File

@ -1039,7 +1039,7 @@ UI.requestFeedbackOnHangup = function () {
// Feedback has been submitted already.
else if (Feedback.isEnabled() && Feedback.isSubmitted()) {
return Promise.resolve({
showThankYou : true,
thankYouDialogVisible : true,
feedbackSubmitted: true
});
}
@ -1047,15 +1047,16 @@ UI.requestFeedbackOnHangup = function () {
return new Promise(function (resolve) {
if (Feedback.isEnabled()) {
Feedback.openFeedbackWindow(
(data) => {
data.showThankYou = false;
resolve(data);
(options) => {
options.thankYouDialogVisible = false;
resolve(options);
});
} else {
// If the feedback functionality isn't enabled we show a thank
// you dialog. Signaling it (true), so the caller
// of requestFeedback can act on it
resolve({showThankYou : true, feedbackSubmitted: false});
resolve(
{thankYouDialogVisible : true, feedbackSubmitted: false});
}
});
};