reset current view, if empty, prevents using activeview with wrong board (#3880)

This commit is contained in:
Scott Bishel 2022-09-30 06:27:24 -06:00 committed by GitHub
parent 959a5ce8ff
commit 68c00cf560
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -197,10 +197,14 @@ const BoardPage = (props: Props): JSX.Element => {
// and set it as most recently viewed board
UserSettings.setLastBoardID(teamId, match.params.boardId)
if (viewId && viewId !== Constants.globalTeamId) {
if (viewId !== Constants.globalTeamId) {
// reset current, even if empty string
dispatch(setCurrentView(viewId))
if (viewId) {
// don't reset per board if empty string
UserSettings.setLastViewId(match.params.boardId, viewId)
}
}
if (!props.readonly && me) {
loadOrJoinBoard(me.id, teamId, match.params.boardId)