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

[Mobile] Disable Page Template picker if Modal Layout Picker is enabled #24061

Merged
merged 7 commits into from
Jul 24, 2020
Merged
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
Expand Up @@ -2,15 +2,16 @@ package org.wordpress.mobile.WPAndroidGlue

import android.os.Bundle

data class GutenbergProps(
data class GutenbergProps @JvmOverloads constructor(
val enableMentions: Boolean,
val enableUnsupportedBlockEditor: Boolean,
val localeSlug: String,
val postType: String,
val editorTheme: Bundle?,
val translations: Bundle,
val isDarkMode: Boolean,
val htmlModeEnabled: Boolean
val htmlModeEnabled: Boolean,
val isModalLayoutPickerEnabled: Boolean = false
) {

fun getInitialProps(bundle: Bundle?) = (bundle ?: Bundle()).apply {
Expand All @@ -24,6 +25,7 @@ data class GutenbergProps(
putBundle(PROP_CAPABILITIES, Bundle().apply {
putBoolean(PROP_CAPABILITIES_MENTIONS, enableMentions)
putBoolean(PROP_CAPABILITIES_UNSUPPORTED_BLOCK_EDITOR, enableUnsupportedBlockEditor)
putBoolean(PROP_CAPABILITIES_MODAL_LAYOUT_PICKER, isModalLayoutPickerEnabled)
})

editorTheme?.also {
Expand Down Expand Up @@ -52,5 +54,6 @@ data class GutenbergProps(
const val PROP_CAPABILITIES = "capabilities"
const val PROP_CAPABILITIES_MENTIONS = "mentions"
const val PROP_CAPABILITIES_UNSUPPORTED_BLOCK_EDITOR = "unsupportedBlockEditor"
const val PROP_CAPABILITIES_MODAL_LAYOUT_PICKER = "modalLayoutPicker"
}
}