Fix duplicate task list shown

This commit is contained in:
Lourens Schep 2022-05-09 11:17:37 -03:00
parent 1e090c3c3c
commit fb62e3392a
2 changed files with 6 additions and 1 deletions

View File

@ -169,6 +169,7 @@ export function hideTaskListSuccess( taskList ) {
return {
type: TYPES.HIDE_TASK_LIST_SUCCESS,
taskList,
taskListId: taskList.id,
};
}
@ -191,6 +192,7 @@ export function unhideTaskListSuccess( taskList ) {
return {
type: TYPES.UNHIDE_TASK_LIST_SUCCESS,
taskList,
taskListId: taskList.id,
};
}

View File

@ -246,7 +246,10 @@ export const ActivityPanel = ( { isEmbedded, query } ) => {
if ( currentLocation !== homescreenLocation ) {
// Ensure that if the user is trying to get to the task list they can see it even if
// it was dismissed.
if ( setupTaskListHidden === 'no' ) {
if (
setupTaskListHidden === 'no' ||
setupTaskListHidden === false
) {
redirectToHomeScreen();
} else {
unhideTaskList( 'setup' ).then( redirectToHomeScreen );