2019-09-19 13:28:57 +00:00
|
|
|
// @flow
|
|
|
|
|
2020-06-03 14:56:08 +00:00
|
|
|
import { PersistenceRegistry, ReducerRegistry } from '../base/redux';
|
2019-09-19 13:28:57 +00:00
|
|
|
|
|
|
|
import { SET_SCREENSHOT_CAPTURE } from './actionTypes';
|
|
|
|
|
|
|
|
PersistenceRegistry.register('features/screnshot-capture', true, {
|
|
|
|
capturesEnabled: false
|
|
|
|
});
|
|
|
|
|
|
|
|
ReducerRegistry.register('features/screenshot-capture', (state = {}, action) => {
|
|
|
|
switch (action.type) {
|
|
|
|
case SET_SCREENSHOT_CAPTURE: {
|
|
|
|
return {
|
|
|
|
...state,
|
|
|
|
capturesEnabled: action.payload
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return state;
|
|
|
|
});
|