From 91fdca1bd0e9dcc62dc34613802a303d87db3088 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 24 Feb 2020 19:33:48 +0100 Subject: [PATCH] fix post rebase --- .../src/components/header/header-toolbar/index.js | 4 ++-- packages/edit-post/src/editor.js | 9 ++++++--- packages/edit-post/src/editor.native.js | 12 +++++++----- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/packages/edit-post/src/components/header/header-toolbar/index.js b/packages/edit-post/src/components/header/header-toolbar/index.js index 511f1112074a5..7de48dc7abffa 100644 --- a/packages/edit-post/src/components/header/header-toolbar/index.js +++ b/packages/edit-post/src/components/header/header-toolbar/index.js @@ -33,8 +33,8 @@ function HeaderToolbar() { isTextModeEnabled: select( 'core/edit-post' ).getEditorMode() === 'text', previewDeviceType: select( - 'core/block-editor' - ).getPreviewDeviceType(), + 'core/edit-post' + ).__experimentalGetPreviewDeviceType(), } ), [] ); diff --git a/packages/edit-post/src/editor.js b/packages/edit-post/src/editor.js index cc902a2d6fdb1..0da931530f2ef 100644 --- a/packages/edit-post/src/editor.js +++ b/packages/edit-post/src/editor.js @@ -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( diff --git a/packages/edit-post/src/editor.native.js b/packages/edit-post/src/editor.native.js index cde254edb7bca..c6ee8737db1f7 100644 --- a/packages/edit-post/src/editor.native.js +++ b/packages/edit-post/src/editor.native.js @@ -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' ),