feat(tile-view): persist setting in local storage (#3379)

* feat(tile-view): persist setting in local storage

* comment
pull/3412/merge jitsi-meet_3312
virtuacoplenny 7 years ago committed by yanas
parent 72776e3a23
commit fe7652ec90
  1. 6
      react/features/video-layout/functions.js
  2. 7
      react/features/video-layout/reducer.js

@ -74,5 +74,11 @@ export function shouldDisplayTileView(state: Object = {}) {
state['features/video-layout']
&& state['features/video-layout'].tileViewEnabled
&& !state['features/etherpad'].editing
// Truthy check is needed for interfaceConfig to prevent errors on
// mobile which does not have interfaceConfig. On web, tile view
// should never be enabled for filmstrip only mode.
&& (typeof interfaceConfig === 'undefined'
|| !interfaceConfig.filmStripOnly)
);
}

@ -1,10 +1,15 @@
// @flow
import { ReducerRegistry } from '../base/redux';
import { PersistenceRegistry } from '../base/storage';
import { SET_TILE_VIEW } from './actionTypes';
ReducerRegistry.register('features/video-layout', (state = {}, action) => {
const STORE_NAME = 'features/video-layout';
PersistenceRegistry.register(STORE_NAME);
ReducerRegistry.register(STORE_NAME, (state = {}, action) => {
switch (action.type) {
case SET_TILE_VIEW:
return {

Loading…
Cancel
Save