feat(tile-view): persist setting in local storage (#3379)
* feat(tile-view): persist setting in local storage * comment
This commit is contained in:
parent
72776e3a23
commit
fe7652ec90
|
@ -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…
Reference in New Issue