Fix push notification switch channel name (#689)

This commit is contained in:
enahum 2017-06-28 12:42:49 -04:00 committed by GitHub
parent c5ea6955ef
commit a22a62fcaa
2 changed files with 6 additions and 3 deletions

View file

@ -44,6 +44,8 @@ export function goToNotification(notification) {
// if the notification does not have a team id is because its from a DM or GM
let teamId = data.team_id || currentTeamId;
dispatch(setChannelDisplayName(''));
if (teamId) {
handleTeamChange(teams[teamId])(dispatch, getState);
await loadChannelsIfNecessary(teamId)(dispatch, getState);
@ -56,7 +58,6 @@ export function goToNotification(notification) {
loadProfilesAndTeamMembersForDMSidebar(teamId)(dispatch, getState);
if (channelId !== currentChannelId) {
dispatch(setChannelDisplayName(''));
handleSelectChannel(channelId)(dispatch, getState);
}
markChannelAsRead(teamId, channelId)(dispatch, getState).then(() => true).catch(() => true);

View file

@ -68,7 +68,8 @@ export default class Mattermost {
// purge the store
store.dispatch({type: General.OFFLINE_STORE_PURGE});
}
}]
}],
{cancelable: false}
);
}
};
@ -103,7 +104,8 @@ export default class Mattermost {
[{
text: intl.formatMessage({id: 'mobile.server_upgrade.button', defaultMessage: 'OK'}),
onPress: this.handleVersionUpgrade
}]
}],
{cancelable: false}
);
} else {
setServerVersion('')(dispatch, getState);