mattermost-mobile/app/reducers/views/connection.js
2017-04-10 11:33:35 -03:00

18 lines
449 B
JavaScript

// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import {UsersTypes} from 'mattermost-redux/constants';
import {ViewTypes} from 'app/constants';
export default function connection(state = true, action) {
switch (action.type) {
case ViewTypes.CONNECTION_CHANGED:
return action.data;
case UsersTypes.LOGOUT_SUCCESS:
return true;
}
return state;
}