Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add isNetworkConnected capability to the Android mobile editor #56583

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ data class GutenbergProps @JvmOverloads constructor(
val enableOnlyCoreBlocks: Boolean,
val canEnableUnsupportedBlockEditor: Boolean,
val isAudioBlockMediaUploadEnabled: Boolean,
val isNetworkConnected: Boolean,
val shouldUseFastImage: Boolean,
val enableReusableBlock: Boolean,
val localeSlug: String,
@@ -74,6 +75,7 @@ data class GutenbergProps @JvmOverloads constructor(
putBoolean(PROP_CAPABILITIES_UNSUPPORTED_BLOCK_EDITOR, enableUnsupportedBlockEditor)
putBoolean(PROP_CAPABILITIES_CAN_ENABLE_UNSUPPORTED_BLOCK_EDITOR, canEnableUnsupportedBlockEditor)
putBoolean(PROP_CAPABILITIES_IS_AUDIO_BLOCK_MEDIA_UPLOAD_ENABLED, isAudioBlockMediaUploadEnabled)
putBoolean(PROP_CAPABILITIES_IS_NETWORK_CONNECTED, isNetworkConnected)
putBoolean(PROP_CAPABILITIES_SHOULD_USE_FASTIMAGE, shouldUseFastImage)
putBoolean(PROP_CAPABILITIES_REUSABLE_BLOCK, enableReusableBlock)
putBoolean(PROP_CAPABILITIES_FACEBOOK_EMBED_BLOCK, enableFacebookEmbed)
@@ -124,6 +126,7 @@ data class GutenbergProps @JvmOverloads constructor(
const val PROP_CAPABILITIES_UNSUPPORTED_BLOCK_EDITOR = "unsupportedBlockEditor"
const val PROP_CAPABILITIES_CAN_ENABLE_UNSUPPORTED_BLOCK_EDITOR = "canEnableUnsupportedBlockEditor"
const val PROP_CAPABILITIES_IS_AUDIO_BLOCK_MEDIA_UPLOAD_ENABLED = "isAudioBlockMediaUploadEnabled"
const val PROP_CAPABILITIES_IS_NETWORK_CONNECTED = "isNetworkConnected"
const val PROP_CAPABILITIES_SHOULD_USE_FASTIMAGE = "shouldUseFastImage"
const val PROP_CAPABILITIES_REUSABLE_BLOCK = "reusableBlock"
const val PROP_CAPABILITIES_SUPPORT_SECTION = "supportSection"
2 changes: 2 additions & 0 deletions packages/react-native-editor/src/setup.js
Original file line number Diff line number Diff line change
@@ -72,6 +72,7 @@ const setupInitHooks = () => {
rawFeatures,
galleryWithImageBlocks,
locale,
isNetworkConnected,
} = props;

if ( initialData === undefined && __DEV__ ) {
@@ -96,6 +97,7 @@ const setupInitHooks = () => {
rawFeatures,
galleryWithImageBlocks,
locale,
isNetworkConnected,
};
}
);