Procházet zdrojové kódy

Addresses comment about Feedback dependency

j8
yanas před 8 roky
rodič
revize
570124058c
4 změnil soubory, kde provedl 14 přidání a 8 odebrání
  1. 2
    2
      conference.js
  2. 0
    5
      modules/UI/Feedback.js
  3. 2
    1
      modules/UI/UI.js
  4. 10
    0
      modules/UI/UIErrors.js

+ 2
- 2
conference.js Zobrazit soubor

@@ -16,7 +16,7 @@ import mediaDeviceHelper from './modules/devices/mediaDeviceHelper';
16 16
 
17 17
 import {reportError} from './modules/util/helpers';
18 18
 
19
-import Feedback from './modules/UI/Feedback';
19
+import UIErrors from './modules/UI/UIErrors';
20 20
 
21 21
 const ConnectionEvents = JitsiMeetJS.events.connection;
22 22
 const ConnectionErrors = JitsiMeetJS.errors.connection;
@@ -240,7 +240,7 @@ function hangup (requestFeedback = false) {
240 240
         // to return a rejected promise. In the case of feedback request
241 241
         // in progress it's important to not redirect to the welcome page
242 242
         // (see below maybeRedirectToWelcomePage call).
243
-        if (err === Feedback.FEEDBACK_REQUEST_IN_PROGRESS) {
243
+        if (err === UIErrors.FEEDBACK_REQUEST_IN_PROGRESS) {
244 244
             return Promise.reject('Feedback request in progress.');
245 245
         }
246 246
         else {

+ 0
- 5
modules/UI/Feedback.js Zobrazit soubor

@@ -86,11 +86,6 @@ function _showFeedbackButton (show) {
86 86
  * toggleStars: Function, hoverStars: Function, unhoverStars: Function}}
87 87
  */
88 88
 var Feedback = {
89
-    /**
90
-     * Indicates a state of the Feedback dialog.
91
-     */
92
-    FEEDBACK_REQUEST_IN_PROGRESS: "FeedbackRequestInProgress",
93
-
94 89
     /**
95 90
      * The feedback score. -1 indicates no score has been given for now.
96 91
      */

+ 2
- 1
modules/UI/UI.js Zobrazit soubor

@@ -23,6 +23,7 @@ import SettingsMenu from "./side_pannels/settings/SettingsMenu";
23 23
 import Settings from "./../settings/Settings";
24 24
 import { reload } from '../util/helpers';
25 25
 import RingOverlay from "./ring_overlay/RingOverlay";
26
+import UIErrors from './UIErrors';
26 27
 
27 28
 var EventEmitter = require("events");
28 29
 UI.messageHandler = require("./util/MessageHandler");
@@ -1064,7 +1065,7 @@ UI.inviteParticipants = function (roomUrl, conferenceName, key, nick) {
1064 1065
  */
1065 1066
 UI.requestFeedback = function () {
1066 1067
     if (Feedback.isVisible())
1067
-        return Promise.reject(Feedback.FEEDBACK_REQUEST_IN_PROGRESS);
1068
+        return Promise.reject(UIErrors.FEEDBACK_REQUEST_IN_PROGRESS);
1068 1069
     else
1069 1070
         return new Promise(function (resolve, reject) {
1070 1071
             if (Feedback.isEnabled()) {

+ 10
- 0
modules/UI/UIErrors.js Zobrazit soubor

@@ -0,0 +1,10 @@
1
+/**
2
+ * A list of all UI errors.
3
+ */
4
+module.exports = {
5
+    /**
6
+     * Indicates that a Feedback request is currently in progress.
7
+     * @type {{FEEDBACK_REQUEST_IN_PROGRESS: string}}
8
+     */
9
+    FEEDBACK_REQUEST_IN_PROGRESS: "FeedbackRequestInProgress"
10
+};

Načítá se…
Zrušit
Uložit