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 { return {
type: TYPES.HIDE_TASK_LIST_SUCCESS, type: TYPES.HIDE_TASK_LIST_SUCCESS,
taskList, taskList,
taskListId: taskList.id,
}; };
} }
@ -191,6 +192,7 @@ export function unhideTaskListSuccess( taskList ) {
return { return {
type: TYPES.UNHIDE_TASK_LIST_SUCCESS, type: TYPES.UNHIDE_TASK_LIST_SUCCESS,
taskList, taskList,
taskListId: taskList.id,
}; };
} }

View File

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