diff --git a/app/actions/views/channel.js b/app/actions/views/channel.js index 0731f1bbd..12949ef87 100644 --- a/app/actions/views/channel.js +++ b/app/actions/views/channel.js @@ -20,7 +20,6 @@ import {getProfilesInChannel} from 'mattermost-redux/actions/users'; import {General, Preferences} from 'mattermost-redux/constants'; import {getCurrentChannelId} from 'mattermost-redux/selectors/entities/channels'; import {getTeamByName} from 'mattermost-redux/selectors/entities/teams'; -import {getConfig} from 'mattermost-redux/selectors/entities/general'; import { getChannelByName, @@ -283,7 +282,6 @@ export function selectPenultimateChannel(teamId) { const {channels, myMembers} = state.entities.channels; const {currentUserId} = state.entities.users; const {myPreferences} = state.entities.preferences; - const viewArchivedChannels = getConfig(state).ExperimentalViewArchivedChannels === 'true'; const lastChannelForTeam = state.views.team.lastChannelForTeam[teamId]; const lastChannelId = lastChannelForTeam && lastChannelForTeam.length > 1 ? lastChannelForTeam[1] : ''; const lastChannel = channels[lastChannelId]; @@ -297,7 +295,7 @@ export function selectPenultimateChannel(teamId) { if ( myMembers[lastChannelId] && lastChannel && - (lastChannel.delete_at === 0 || viewArchivedChannels) && + lastChannel.delete_at === 0 && (lastChannel.team_id === teamId || isDMVisible || isGMVisible) ) { dispatch(setChannelLoading(true));