Quellcode durchsuchen

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.
j8
damencho vor 9 Jahren
Ursprung
Commit
415619021f
2 geänderte Dateien mit 16 neuen und 9 gelöschten Zeilen
  1. 13
    1
      conference.js
  2. 3
    8
      modules/UI/UI.js

+ 13
- 1
conference.js Datei anzeigen

202
 
202
 
203
 /**
203
 /**
204
  * Check if the welcome page is enabled and redirects to it.
204
  * Check if the welcome page is enabled and redirects to it.
205
+ * If requested show a thank you dialog before that.
206
+ * @param {boolean} showThankYou whether we should show a thank you dialog
205
  */
207
  */
206
-function maybeRedirectToWelcomePage() {
208
+function maybeRedirectToWelcomePage(showThankYou) {
209
+
210
+    if (showThankYou) {
211
+        APP.UI.messageHandler.openMessageDialog(
212
+            null, null, null,
213
+            APP.translation.translateString(
214
+                "dialog.thankYou", {appName:interfaceConfig.APP_NAME}
215
+            )
216
+        );
217
+    }
218
+
207
     if (!config.enableWelcomePage) {
219
     if (!config.enableWelcomePage) {
208
         return;
220
         return;
209
     }
221
     }

+ 3
- 8
modules/UI/UI.js Datei anzeigen

1130
                 }
1130
                 }
1131
             } else {
1131
             } else {
1132
                 // If the feedback functionality isn't enabled we show a thank
1132
                 // If the feedback functionality isn't enabled we show a thank
1133
-                // you dialog.
1134
-                messageHandler.openMessageDialog(
1135
-                    null, null, null,
1136
-                    APP.translation.translateString(
1137
-                        "dialog.thankYou", {appName:interfaceConfig.APP_NAME}
1138
-                    )
1139
-                );
1140
-                resolve();
1133
+                // you dialog. Signaling it (true), so the caller
1134
+                // of requestFeedback can act on it
1135
+                resolve(true);
1141
             }
1136
             }
1142
         });
1137
         });
1143
 };
1138
 };

Laden…
Abbrechen
Speichern