Переглянути джерело

Fix enable feedback button check

master
yanas 9 роки тому
джерело
коміт
7ba8b0a24e
3 змінених файлів з 10 додано та 12 видалено
  1. 7
    4
      modules/UI/Feedback.js
  2. 2
    2
      modules/UI/UI.js
  3. 1
    6
      modules/recorder/Recorder.js

+ 7
- 4
modules/UI/Feedback.js Переглянути файл

100
      * @param emitter the EventEmitter to associate with the Feedback.
100
      * @param emitter the EventEmitter to associate with the Feedback.
101
      */
101
      */
102
     init: function (emitter) {
102
     init: function (emitter) {
103
-        // Initialise to enabled.
104
-        this.enabled = true;
105
-
106
         // CallStats is the way we send feedback, so we don't have to initialise
103
         // CallStats is the way we send feedback, so we don't have to initialise
107
         // if callstats isn't enabled.
104
         // if callstats isn't enabled.
108
         if (!APP.conference.isCallstatsEnabled())
105
         if (!APP.conference.isCallstatsEnabled())
109
             return;
106
             return;
110
 
107
 
111
-        _showFeedbackButton(true);
108
+        // If enabled property is still undefined, i.e. it hasn't been set from
109
+        // some other module already, we set it to true by default.
110
+        if (typeof this.enabled == "undefined")
111
+            this.enabled = true;
112
+
113
+        _showFeedbackButton(this.enabled);
114
+
112
         $("#feedbackButton").click(function (event) {
115
         $("#feedbackButton").click(function (event) {
113
             Feedback.openFeedbackWindow();
116
             Feedback.openFeedbackWindow();
114
         });
117
         });

+ 2
- 2
modules/UI/UI.js Переглянути файл

31
 import FollowMe from "../FollowMe";
31
 import FollowMe from "../FollowMe";
32
 import Recorder from "../recorder/Recorder";
32
 import Recorder from "../recorder/Recorder";
33
 
33
 
34
-
35
 var eventEmitter = new EventEmitter();
34
 var eventEmitter = new EventEmitter();
36
 UI.eventEmitter = eventEmitter;
35
 UI.eventEmitter = eventEmitter;
37
 
36
 
245
     // Initialise the recorder handler. We're doing this explicitly before
244
     // Initialise the recorder handler. We're doing this explicitly before
246
     // calling showToolbar, because the recorder may want to disable all
245
     // calling showToolbar, because the recorder may want to disable all
247
     // toolbars.
246
     // toolbars.
248
-    new Recorder(APP.conference, UI);
247
+    new Recorder(APP.conference);
249
 
248
 
250
     // Once we've joined the muc show the toolbar
249
     // Once we've joined the muc show the toolbar
251
     ToolbarToggler.showToolbar();
250
     ToolbarToggler.showToolbar();
260
     UI.setUserAvatar(id, Settings.getEmail());
259
     UI.setUserAvatar(id, Settings.getEmail());
261
 
260
 
262
     Toolbar.checkAutoEnableDesktopSharing();
261
     Toolbar.checkAutoEnableDesktopSharing();
262
+
263
     if(!interfaceConfig.filmStripOnly) {
263
     if(!interfaceConfig.filmStripOnly) {
264
         Feedback.init(eventEmitter);
264
         Feedback.init(eventEmitter);
265
     }
265
     }

+ 1
- 6
modules/recorder/Recorder.js Переглянути файл

27
      *
27
      *
28
      * @param conference the {conference} which is to transport
28
      * @param conference the {conference} which is to transport
29
      * {Recorder}-related information between participants
29
      * {Recorder}-related information between participants
30
-     * @param UI the {UI} which is the source (model/state) to be sent to
31
-     * remote participants if the local participant is the moderator or the
32
-     * destination (model/state) to receive from the remote moderator if the
33
-     * local participant is not the moderator
34
      */
30
      */
35
-    constructor (conference, UI) {
31
+    constructor (conference) {
36
         this._conference = conference;
32
         this._conference = conference;
37
-        this._UI = UI;
38
 
33
 
39
         // If I am a recorder then I publish my recorder custom role to notify
34
         // If I am a recorder then I publish my recorder custom role to notify
40
         // everyone.
35
         // everyone.

Завантаження…
Відмінити
Зберегти