浏览代码

Renames variables.

j8
damencho 8 年前
父节点
当前提交
ae01275729
共有 2 个文件被更改,包括 13 次插入11 次删除
  1. 7
    6
      conference.js
  2. 6
    5
      modules/UI/UI.js

+ 7
- 6
conference.js 查看文件

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

+ 6
- 5
modules/UI/UI.js 查看文件

@@ -1039,7 +1039,7 @@ UI.requestFeedbackOnHangup = function () {
1039 1039
     // Feedback has been submitted already.
1040 1040
     else if (Feedback.isEnabled() && Feedback.isSubmitted()) {
1041 1041
         return Promise.resolve({
1042
-            showThankYou : true,
1042
+            thankYouDialogVisible : true,
1043 1043
             feedbackSubmitted: true
1044 1044
         });
1045 1045
     }
@@ -1047,15 +1047,16 @@ UI.requestFeedbackOnHangup = function () {
1047 1047
         return new Promise(function (resolve) {
1048 1048
             if (Feedback.isEnabled()) {
1049 1049
                 Feedback.openFeedbackWindow(
1050
-                    (data) => {
1051
-                        data.showThankYou = false;
1052
-                        resolve(data);
1050
+                    (options) => {
1051
+                        options.thankYouDialogVisible = false;
1052
+                        resolve(options);
1053 1053
                     });
1054 1054
             } else {
1055 1055
                 // If the feedback functionality isn't enabled we show a thank
1056 1056
                 // you dialog. Signaling it (true), so the caller
1057 1057
                 // of requestFeedback can act on it
1058
-                resolve({showThankYou : true, feedbackSubmitted: false});
1058
+                resolve(
1059
+                    {thankYouDialogVisible : true, feedbackSubmitted: false});
1059 1060
             }
1060 1061
         });
1061 1062
 };

正在加载...
取消
保存