|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+// @flow
|
|
|
2
|
+
|
|
|
3
|
+import { StateListenerRegistry } from '../base/redux';
|
|
|
4
|
+import { shouldDisplayTileView } from '../video-layout';
|
|
|
5
|
+
|
|
|
6
|
+declare var APP: Object;
|
|
|
7
|
+
|
|
|
8
|
+/**
|
|
|
9
|
+ * StateListenerRegistry provides a reliable way of detecting changes to
|
|
|
10
|
+ * preferred layout state and dispatching additional actions.
|
|
|
11
|
+ */
|
|
|
12
|
+StateListenerRegistry.register(
|
|
|
13
|
+ /* selector */ state => shouldDisplayTileView(state),
|
|
|
14
|
+ /* listener */ displayTileView => {
|
|
|
15
|
+ APP.API.notifyTileViewChanged(displayTileView);
|
|
|
16
|
+ });
|