Skip to content

Commit

Permalink
added contactInfoBlock enabling capabilities flag to mobile gutenberg…
Browse files Browse the repository at this point in the history
… bridge (#28293)
  • Loading branch information
mzorz authored Jan 27, 2021
1 parent d33e113 commit 3e6cf7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.wordpress.mobile.WPAndroidGlue
import android.os.Bundle

data class GutenbergProps @JvmOverloads constructor(
val enableContactInfoBlock: Boolean,
val enableMediaFilesCollectionBlocks: Boolean,
val enableMentions: Boolean,
val enableXPosts: Boolean,
Expand Down Expand Up @@ -39,6 +40,7 @@ data class GutenbergProps @JvmOverloads constructor(
fun getUpdatedCapabilitiesProps() = Bundle().apply {
putBoolean(PROP_CAPABILITIES_MENTIONS, enableMentions)
putBoolean(PROP_CAPABILITIES_XPOSTS, enableXPosts)
putBoolean(PROP_CAPABILITIES_CONTACT_INFO_BLOCK, enableContactInfoBlock)
putBoolean(PROP_CAPABILITIES_MEDIAFILES_COLLECTION_BLOCK, enableMediaFilesCollectionBlocks)
putBoolean(PROP_CAPABILITIES_UNSUPPORTED_BLOCK_EDITOR, enableUnsupportedBlockEditor)
putBoolean(PROP_CAPABILITIES_CAN_ENABLE_UNSUPPORTED_BLOCK_EDITOR, canEnableUnsupportedBlockEditor)
Expand Down Expand Up @@ -66,6 +68,7 @@ data class GutenbergProps @JvmOverloads constructor(
private const val PROP_EDITOR_MODE_EDITOR = "editor"

const val PROP_CAPABILITIES = "capabilities"
const val PROP_CAPABILITIES_CONTACT_INFO_BLOCK = "contactInfoBlock"
const val PROP_CAPABILITIES_MEDIAFILES_COLLECTION_BLOCK = "mediaFilesCollectionBlock"
const val PROP_CAPABILITIES_MENTIONS = "mentions"
const val PROP_CAPABILITIES_XPOSTS = "xposts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public struct MediaInfo: Encodable {

/// Definition of capabilities to enable in the Block Editor
public enum Capabilities: String {
case contactInfoBlock
case mediaFilesCollectionBlock
case mentions
case xposts
Expand Down

0 comments on commit 3e6cf7b

Please sign in to comment.