Przeglądaj źródła

ref(notifications): convert Thank You message to a notification

master
Leonard Kim 7 lat temu
rodzic
commit
f3b5ed2ef4
2 zmienionych plików z 13 dodań i 10 usunięć
  1. 7
    4
      conference.js
  2. 6
    6
      react/features/feedback/actions.js

+ 7
- 4
conference.js Wyświetl plik

@@ -62,6 +62,7 @@ import {
62 62
     setVideoAvailable,
63 63
     setVideoMuted
64 64
 } from './react/features/base/media';
65
+import { showNotification } from './react/features/notifications';
65 66
 import {
66 67
     dominantSpeakerChanged,
67 68
     getAvatarURLByParticipantId,
@@ -203,7 +204,7 @@ function muteLocalVideo(muted) {
203 204
  *
204 205
  * @param {object} options used to decide which particular close page to show
205 206
  * or if close page is disabled, whether we should show the thankyou dialog
206
- * @param {boolean} options.thankYouDialogVisible - whether we should
207
+ * @param {boolean} options.showThankYou - whether we should
207 208
  * show thank you dialog
208 209
  * @param {boolean} options.feedbackSubmitted - whether feedback was submitted
209 210
  */
@@ -222,9 +223,11 @@ function maybeRedirectToWelcomePage(options) {
222 223
     }
223 224
 
224 225
     // else: show thankYou dialog only if there is no feedback
225
-    if (options.thankYouDialogVisible) {
226
-        APP.UI.messageHandler.openMessageDialog(
227
-            null, 'dialog.thankYou', { appName: interfaceConfig.APP_NAME });
226
+    if (options.showThankYou) {
227
+        APP.store.dispatch(showNotification({
228
+            titleArguments: { appName: interfaceConfig.APP_NAME },
229
+            titleKey: 'dialog.thankYou'
230
+        }));
228 231
     }
229 232
 
230 233
     // if Welcome page is enabled redirect to welcome page after 3 sec.

+ 6
- 6
react/features/feedback/actions.js Wyświetl plik

@@ -43,7 +43,7 @@ export function cancelFeedback(score: number, message: string) {
43 43
 export function maybeOpenFeedbackDialog(conference: Object) {
44 44
     type R = {
45 45
         feedbackSubmitted: boolean,
46
-        thankYouDialogVisible: boolean
46
+        showThankYou: boolean
47 47
     };
48 48
 
49 49
     return (dispatch: Dispatch<*>, getState: Function): Promise<R> => {
@@ -61,7 +61,7 @@ export function maybeOpenFeedbackDialog(conference: Object) {
61 61
 
62 62
             return Promise.resolve({
63 63
                 feedbackSubmitted: true,
64
-                thankYouDialogVisible: true
64
+                showThankYou: true
65 65
             });
66 66
         } else if (conference.isCallstatsEnabled()) {
67 67
             return new Promise(resolve => {
@@ -70,18 +70,18 @@ export function maybeOpenFeedbackDialog(conference: Object) {
70 70
 
71 71
                     resolve({
72 72
                         feedbackSubmitted: submitted,
73
-                        thankYouDialogVisible: false
73
+                        showThankYou: false
74 74
                     });
75 75
                 }));
76 76
             });
77 77
         }
78 78
 
79 79
         // If the feedback functionality isn't enabled we show a "thank you"
80
-        // dialog. Signaling it (true), so the caller of requestFeedback can act
81
-        // on it.
80
+        // message. Signaling it (true), so the caller of requestFeedback can
81
+        // act on it.
82 82
         return Promise.resolve({
83 83
             feedbackSubmitted: false,
84
-            thankYouDialogVisible: true
84
+            showThankYou: true
85 85
         });
86 86
     };
87 87
 }

Ładowanie…
Anuluj
Zapisz