From 587ba38f4ece53721583fbafdf004584f4df4376 Mon Sep 17 00:00:00 2001 From: Amit Uttam Date: Fri, 20 Mar 2020 13:53:33 -0300 Subject: [PATCH] MM-23234 Prefer mobile-defined state actions (#4057) Unify usage to one set of defined dispatch actions in codebase, instead of a mix of (almost) identical actions defined in `mattermost-mobile` and `mattermost-redux` . --- app/components/network_indicator/index.js | 4 ++-- app/screens/error_teams_list/index.js | 2 +- app/screens/select_team/index.js | 2 +- app/screens/terms_of_service/index.js | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/components/network_indicator/index.js b/app/components/network_indicator/index.js index 55c071d1e..64c0d3b4a 100644 --- a/app/components/network_indicator/index.js +++ b/app/components/network_indicator/index.js @@ -4,13 +4,13 @@ import {bindActionCreators} from 'redux'; import {connect} from 'react-redux'; -import {stopPeriodicStatusUpdates, startPeriodicStatusUpdates, logout} from 'mattermost-redux/actions/users'; +import {stopPeriodicStatusUpdates, startPeriodicStatusUpdates} from 'mattermost-redux/actions/users'; import {init as initWebSocket, close as closeWebSocket} from 'mattermost-redux/actions/websocket'; import {getCurrentChannelId} from 'mattermost-redux/selectors/entities/channels'; import {connection} from 'app/actions/device'; import {markChannelViewedAndReadOnReconnect, setChannelRetryFailed} from 'app/actions/views/channel'; -import {setCurrentUserStatusOffline} from 'app/actions/views/user'; +import {setCurrentUserStatusOffline, logout} from 'app/actions/views/user'; import {getConnection, isLandscape} from 'app/selectors/device'; import NetworkIndicator from './network_indicator'; diff --git a/app/screens/error_teams_list/index.js b/app/screens/error_teams_list/index.js index 31424ed03..2512a624a 100644 --- a/app/screens/error_teams_list/index.js +++ b/app/screens/error_teams_list/index.js @@ -4,7 +4,7 @@ import {bindActionCreators} from 'redux'; import {connect} from 'react-redux'; -import {logout, loadMe} from 'mattermost-redux/actions/users'; +import {logout, loadMe} from 'app/actions/views/user'; import {connection} from 'app/actions/device'; import {selectDefaultTeam} from 'app/actions/views/select_team'; diff --git a/app/screens/select_team/index.js b/app/screens/select_team/index.js index 6a1dba046..3d5392ec3 100644 --- a/app/screens/select_team/index.js +++ b/app/screens/select_team/index.js @@ -5,11 +5,11 @@ import {bindActionCreators} from 'redux'; import {connect} from 'react-redux'; import {getTeams, addUserToTeam, joinTeam} from 'mattermost-redux/actions/teams'; -import {logout} from 'mattermost-redux/actions/users'; import {getTheme} from 'mattermost-redux/selectors/entities/preferences'; import {getJoinableTeams} from 'mattermost-redux/selectors/entities/teams'; import {getCurrentUser} from 'mattermost-redux/selectors/entities/users'; +import {logout} from 'app/actions/views/user'; import {handleTeamChange} from 'app/actions/views/select_team'; import {isLandscape} from 'app/selectors/device'; import {isGuest} from 'app/utils/users'; diff --git a/app/screens/terms_of_service/index.js b/app/screens/terms_of_service/index.js index a9c843bac..ec4c3ce8a 100644 --- a/app/screens/terms_of_service/index.js +++ b/app/screens/terms_of_service/index.js @@ -4,9 +4,10 @@ import {bindActionCreators} from 'redux'; import {connect} from 'react-redux'; -import {getTermsOfService, logout, updateMyTermsOfServiceStatus} from 'mattermost-redux/actions/users'; +import {getTermsOfService, updateMyTermsOfServiceStatus} from 'mattermost-redux/actions/users'; import {getConfig} from 'mattermost-redux/selectors/entities/general'; import {getTheme} from 'mattermost-redux/selectors/entities/preferences'; +import {logout} from 'app/actions/views/user'; import TermsOfService from './terms_of_service.js';