mattermost-mobile/app/reducers/views/root.js
2018-06-19 19:14:50 -04:00

29 lines
636 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {combineReducers} from 'redux';
import {General} from 'mattermost-redux/constants';
function hydrationComplete(state = false, action) {
switch (action.type) {
case General.STORE_REHYDRATION_COMPLETE:
return true;
default:
return state;
}
}
function purge(state = false, action) {
switch (action.type) {
case General.OFFLINE_STORE_PURGE:
return true;
default:
return state;
}
}
export default combineReducers({
hydrationComplete,
purge,
});