fix channel mention when app is started from push notification (#2638)
This commit is contained in:
parent
c7dc992ac0
commit
35efa47b35
2 changed files with 4 additions and 4 deletions
|
|
@ -344,7 +344,7 @@ export function selectDefaultChannel(teamId) {
|
|||
};
|
||||
}
|
||||
|
||||
export function handleSelectChannel(channelId) {
|
||||
export function handleSelectChannel(channelId, fromPushNotification = false) {
|
||||
return async (dispatch, getState) => {
|
||||
const state = getState();
|
||||
const channel = getChannel(state, channelId);
|
||||
|
|
@ -375,8 +375,8 @@ export function handleSelectChannel(channelId) {
|
|||
},
|
||||
]));
|
||||
|
||||
dispatch(markChannelAsRead(channelId, sameChannel ? null : currentChannelId));
|
||||
dispatch(markChannelAsViewed(channelId, sameChannel ? null : currentChannelId));
|
||||
dispatch(markChannelAsRead(channelId, fromPushNotification || sameChannel ? null : currentChannelId));
|
||||
dispatch(markChannelAsViewed(channelId, fromPushNotification || sameChannel ? null : currentChannelId));
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ export function loadFromPushNotification(notification, startAppFromPushNotificat
|
|||
} else if (channelId !== currentChannelId) {
|
||||
// when the notification is from a channel other than the current channel
|
||||
dispatch(setChannelDisplayName(''));
|
||||
dispatch(handleSelectChannel(channelId));
|
||||
dispatch(handleSelectChannel(channelId, true));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue