Browse Source

Merge branch 'fix_ring_overlay'

j8
Lyubomir Marinov 8 years ago
parent
commit
137aace970
2 changed files with 14 additions and 14 deletions
  1. 2
    2
      modules/UI/UI.js
  2. 12
    12
      modules/UI/videolayout/FilmStrip.js

+ 2
- 2
modules/UI/UI.js View File

@@ -1400,13 +1400,13 @@ UI.setMicrophoneButtonEnabled = function (enabled) {
1400 1400
 
1401 1401
 UI.showRingOverlay = function () {
1402 1402
     RingOverlay.show(APP.tokenData.callee, interfaceConfig.DISABLE_RINGING);
1403
-    FilmStrip.toggleFilmStrip(false);
1403
+    FilmStrip.toggleFilmStrip(false, false);
1404 1404
 };
1405 1405
 
1406 1406
 UI.hideRingOverLay = function () {
1407 1407
     if (!RingOverlay.hide())
1408 1408
         return;
1409
-    FilmStrip.toggleFilmStrip(true);
1409
+    FilmStrip.toggleFilmStrip(true, false);
1410 1410
 };
1411 1411
 
1412 1412
 /**

+ 12
- 12
modules/UI/videolayout/FilmStrip.js View File

@@ -114,30 +114,34 @@ const FilmStrip = {
114 114
      * of the film strip. If not specified, the visibility will be flipped
115 115
      * (i.e. toggled); otherwise, the visibility will be set to the specified
116 116
      * value.
117
+     * @param {Boolean} sendAnalytics - True to send an analytics event. The
118
+     * default value is true.
117 119
      *
118 120
      * Note:
119 121
      * This method shouldn't be executed directly to hide the filmstrip.
120 122
      * It's important to hide the filmstrip with UI.toggleFilmstrip in order
121 123
      * to correctly resize the video area.
122 124
      */
123
-    toggleFilmStrip(visible) {
124
-        let isVisibleDefined = typeof visible === 'boolean';
125
+    toggleFilmStrip(visible, sendAnalytics = true) {
126
+        const isVisibleDefined = typeof visible === 'boolean';
125 127
         if (!isVisibleDefined) {
126 128
             visible = this.isFilmStripVisible();
127 129
         } else if (this.isFilmStripVisible() === visible) {
128 130
             return;
129 131
         }
130
-        JitsiMeetJS.analytics.sendEvent('toolbar.filmstrip.toggled');
132
+        if (sendAnalytics) {
133
+            JitsiMeetJS.analytics.sendEvent('toolbar.filmstrip.toggled');
134
+        }
131 135
         this.filmStrip.toggleClass("hidden");
132 136
 
133
-        if (!visible) {
134
-            this.showMenuDownIcon();
135
-        } else {
137
+        if (visible) {
136 138
             this.showMenuUpIcon();
139
+        } else {
140
+            this.showMenuDownIcon();
137 141
         }
138 142
 
139 143
         // Emit/fire UIEvents.TOGGLED_FILM_STRIP.
140
-        var eventEmitter = this.eventEmitter;
144
+        const eventEmitter = this.eventEmitter;
141 145
         if (eventEmitter) {
142 146
             eventEmitter.emit(
143 147
                 UIEvents.TOGGLED_FILM_STRIP,
@@ -372,9 +376,7 @@ const FilmStrip = {
372 376
      * @param forceUpdate
373 377
      * @returns {Promise}
374 378
      */
375
-    resizeThumbnails(local, remote,
376
-                      animate = false, forceUpdate = false) {
377
-
379
+    resizeThumbnails(local, remote, animate = false, forceUpdate = false) {
378 380
         return new Promise(resolve => {
379 381
             let thumbs = this.getThumbs(!forceUpdate);
380 382
             let promises = [];
@@ -455,9 +457,7 @@ const FilmStrip = {
455 457
         } else {
456 458
             return { remoteThumbs, localThumb };
457 459
         }
458
-
459 460
     }
460
-
461 461
 };
462 462
 
463 463
 export default FilmStrip;

Loading…
Cancel
Save