Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/editor/src/store/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { combineReducers } from '@wordpress/data';
import { EDITOR_SETTINGS_DEFAULTS } from './defaults';
import dataviewsReducer from '../dataviews/store/reducer';

const LIST_VIEW_PANEL_HIDDEN_BY_INSERTER = 'hidden-by-inserter';

/**
* Returns a post attribute value, flattening nested rendered content using its
* raw value in place of its original object form.
Expand Down Expand Up @@ -343,7 +345,10 @@ export function blockInserterPanel( state = false, action ) {
export function listViewPanel( state = false, action ) {
switch ( action.type ) {
case 'SET_IS_INSERTER_OPENED':
return action.value ? false : state;
if ( action.value ) {
return state ? LIST_VIEW_PANEL_HIDDEN_BY_INSERTER : false;
}
return state === LIST_VIEW_PANEL_HIDDEN_BY_INSERTER ? true : state;
case 'SET_IS_LIST_VIEW_OPENED':
return action.isOpen;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ export const getDeviceType = createRegistrySelector(
* @return {boolean} Whether the list view is opened.
*/
export function isListViewOpened( state ) {
return state.listViewPanel;
return state.listViewPanel === true;
}

/**
Expand Down
Loading