Skip to content

Commit

Permalink
fix post rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Feb 24, 2020
1 parent b1f3a9d commit 91fdca1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ function HeaderToolbar() {
isTextModeEnabled:
select( 'core/edit-post' ).getEditorMode() === 'text',
previewDeviceType: select(
'core/block-editor'
).getPreviewDeviceType(),
'core/edit-post'
).__experimentalGetPreviewDeviceType(),
} ),
[]
);
Expand Down
9 changes: 6 additions & 3 deletions packages/edit-post/src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,19 @@ class Editor extends Component {

export default compose( [
withSelect( ( select, { postId, postType } ) => {
const { isFeatureActive, getPreference } = select( 'core/edit-post' );
const {
isFeatureActive,
getPreference,
__experimentalGetPreviewDeviceType,
} = select( 'core/edit-post' );
const { getEntityRecord } = select( 'core' );
const { getBlockTypes } = select( 'core/blocks' );
const { getPreviewDeviceType } = select( 'core/block-editor' );

return {
showInserterHelpPanel: isFeatureActive( 'showInserterHelpPanel' ),
hasFixedToolbar:
isFeatureActive( 'fixedToolbar' ) ||
getPreviewDeviceType() !== 'Desktop',
__experimentalGetPreviewDeviceType() !== 'Desktop',
focusMode: isFeatureActive( 'focusMode' ),
post: getEntityRecord( 'postType', postType, postId ),
preferredStyleVariations: getPreference(
Expand Down
12 changes: 7 additions & 5 deletions packages/edit-post/src/editor.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,18 @@ class Editor extends Component {

export default compose( [
withSelect( ( select ) => {
const { isFeatureActive, getEditorMode, getPreference } = select(
'core/edit-post'
);
const {
isFeatureActive,
getEditorMode,
getPreference,
__experimentalGetPreviewDeviceType,
} = select( 'core/edit-post' );
const { getBlockTypes } = select( 'core/blocks' );
const { getPreviewDeviceType } = select( 'core/block-editor' );

return {
hasFixedToolbar:
isFeatureActive( 'fixedToolbar' ) ||
getPreviewDeviceType() !== 'Desktop',
__experimentalGetPreviewDeviceType() !== 'Desktop',
focusMode: isFeatureActive( 'focusMode' ),
mode: getEditorMode(),
hiddenBlockTypes: getPreference( 'hiddenBlockTypes' ),
Expand Down

0 comments on commit 91fdca1

Please sign in to comment.