Bläddra i källkod

fix(tile-view): disable on etherpad display, disable etherpad on view enter

master
Leonard Kim 7 år sedan
förälder
incheckning
1396d59ce2
1 ändrade filer med 20 tillägg och 3 borttagningar
  1. 20
    3
      react/features/video-layout/middleware.any.js

+ 20
- 3
react/features/video-layout/middleware.any.js Visa fil

4
     pinParticipant
4
     pinParticipant
5
 } from '../base/participants';
5
 } from '../base/participants';
6
 import { MiddlewareRegistry } from '../base/redux';
6
 import { MiddlewareRegistry } from '../base/redux';
7
+import { SET_DOCUMENT_EDITING_STATUS, toggleDocument } from '../etherpad';
7
 
8
 
8
 import { SET_TILE_VIEW } from './actionTypes';
9
 import { SET_TILE_VIEW } from './actionTypes';
9
 import { setTileView } from './actions';
10
 import { setTileView } from './actions';
27
         break;
28
         break;
28
     }
29
     }
29
 
30
 
30
-    case SET_TILE_VIEW:
31
-        if (getPinnedParticipant(store.getState()) && action.enabled) {
32
-            store.dispatch(pinParticipant(null));
31
+    case SET_DOCUMENT_EDITING_STATUS:
32
+        if (action.editing) {
33
+            store.dispatch(setTileView(false));
34
+        }
35
+
36
+        break;
37
+
38
+    case SET_TILE_VIEW: {
39
+        const state = store.getState();
40
+
41
+        if (action.enabled) {
42
+            if (getPinnedParticipant(state)) {
43
+                store.dispatch(pinParticipant(null));
44
+            }
45
+
46
+            if (state['features/etherpad'].editing) {
47
+                store.dispatch(toggleDocument());
48
+            }
33
         }
49
         }
34
 
50
 
35
         break;
51
         break;
36
     }
52
     }
53
+    }
37
 
54
 
38
     return next(action);
55
     return next(action);
39
 });
56
 });

Laddar…
Avbryt
Spara