Преглед изворни кода

feat(tile-view): exit tile view on pin (#3430)

* feat(tile-view): exit tile view on pin

* Try out this other ux impl
master
virtuacoplenny пре 7 година
родитељ
комит
e63cd8c81b

+ 2
- 5
modules/UI/shared_video/SharedVideoThumb.js Прегледај датотеку

1
-/* global $, APP */
2
-import { shouldDisplayTileView } from '../../../react/features/video-layout';
1
+/* global $ */
3
 
2
 
4
 import SmallVideo from '../videolayout/SmallVideo';
3
 import SmallVideo from '../videolayout/SmallVideo';
5
 
4
 
66
  * The thumb click handler.
65
  * The thumb click handler.
67
  */
66
  */
68
 SharedVideoThumb.prototype.videoClick = function() {
67
 SharedVideoThumb.prototype.videoClick = function() {
69
-    if (!shouldDisplayTileView(APP.store.getState())) {
70
-        this._togglePin();
71
-    }
68
+    this._togglePin();
72
 };
69
 };
73
 
70
 
74
 /**
71
 /**

+ 1
- 3
modules/UI/videolayout/LocalVideo.js Прегледај датотеку

275
         = $source.parents('.displayNameContainer').length > 0;
275
         = $source.parents('.displayNameContainer').length > 0;
276
     const clickedOnPopover = $source.parents('.popover').length > 0
276
     const clickedOnPopover = $source.parents('.popover').length > 0
277
             || classList.contains('popover');
277
             || classList.contains('popover');
278
-    const ignoreClick = clickedOnDisplayName
279
-        || clickedOnPopover
280
-        || shouldDisplayTileView(APP.store.getState());
278
+    const ignoreClick = clickedOnDisplayName || clickedOnPopover;
281
 
279
 
282
     if (event.stopPropagation && !ignoreClick) {
280
     if (event.stopPropagation && !ignoreClick) {
283
         event.stopPropagation();
281
         event.stopPropagation();

+ 1
- 2
modules/UI/videolayout/RemoteVideo.js Прегледај датотеку

627
     const { classList } = event.target;
627
     const { classList } = event.target;
628
 
628
 
629
     const ignoreClick = $source.parents('.popover').length > 0
629
     const ignoreClick = $source.parents('.popover').length > 0
630
-            || classList.contains('popover')
631
-            || shouldDisplayTileView(APP.store.getState());
630
+            || classList.contains('popover');
632
 
631
 
633
     if (!ignoreClick) {
632
     if (!ignoreClick) {
634
         this._togglePin();
633
         this._togglePin();

+ 1
- 0
modules/UI/videolayout/SmallVideo.js Прегледај датотеку

30
 import {
30
 import {
31
     LAYOUTS,
31
     LAYOUTS,
32
     getCurrentLayout,
32
     getCurrentLayout,
33
+    setTileView,
33
     shouldDisplayTileView
34
     shouldDisplayTileView
34
 } from '../../../react/features/video-layout';
35
 } from '../../../react/features/video-layout';
35
 /* eslint-enable no-unused-vars */
36
 /* eslint-enable no-unused-vars */

+ 2
- 0
react/features/video-layout/functions.js Прегледај датотеку

1
 // @flow
1
 // @flow
2
 
2
 
3
 import { LAYOUTS } from './constants';
3
 import { LAYOUTS } from './constants';
4
+import { getPinnedParticipant } from '../base/participants';
4
 
5
 
5
 declare var interfaceConfig: Object;
6
 declare var interfaceConfig: Object;
6
 
7
 
80
             // should never be enabled for filmstrip only mode.
81
             // should never be enabled for filmstrip only mode.
81
             && (typeof interfaceConfig === 'undefined'
82
             && (typeof interfaceConfig === 'undefined'
82
                 || !interfaceConfig.filmStripOnly)
83
                 || !interfaceConfig.filmStripOnly)
84
+            && !getPinnedParticipant(state)
83
     );
85
     );
84
 }
86
 }

Loading…
Откажи
Сачувај