Skip to content
Merged
Show file tree
Hide file tree
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 @@ -233,8 +233,6 @@ import org.wordpress.android.widgets.WPSnackbar.Companion.make
import org.wordpress.android.widgets.WPViewPager
import org.wordpress.gutenberg.GutenbergJsException
import org.wordpress.gutenberg.GutenbergView
import org.wordpress.gutenberg.WebViewGlobal
import org.wordpress.gutenberg.WebViewGlobalValue
import java.io.File
import java.util.regex.Matcher
import java.util.regex.Pattern
Expand Down Expand Up @@ -2341,16 +2339,6 @@ class GutenbergKitActivity : BaseAppCompatActivity(), EditorFragmentActivity, Ed
"plugins" to shouldUsePlugins(applicationPassword),
"locale" to wpcomLocaleSlug,
"cookies" to editPostAuthViewModel.getCookiesForPrivateSites(site, privateAtomicCookie),
"webViewGlobals" to listOf(
WebViewGlobal(
"_currentSiteType",
when {
siteModel.isWPComAtomic -> WebViewGlobalValue.StringValue("atomic")
siteModel.isWPCom -> WebViewGlobalValue.StringValue("simple")
else -> WebViewGlobalValue.NullValue
}
)
)
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import org.wordpress.gutenberg.GutenbergView.TitleAndContentCallback
import org.wordpress.gutenberg.GutenbergWebViewPool.getPreloadedWebView
import org.wordpress.gutenberg.GutenbergWebViewPool.recycleWebView
import org.wordpress.gutenberg.Media
import org.wordpress.gutenberg.WebViewGlobal
import java.io.Serializable
import java.util.concurrent.CountDownLatch

Expand Down Expand Up @@ -238,8 +237,6 @@ class GutenbergKitEditorFragment : GutenbergKitEditorFragmentBase() {
private fun Map<String, Any?>.getStringArray(key: String): Array<String> =
getSetting<Array<String?>>(key)?.asSequence()?.filterNotNull()?.toList()?.toTypedArray() ?: emptyArray()

private fun Map<String, Any?>.getWebViewGlobals(key: String): List<WebViewGlobal> =
getSetting<List<WebViewGlobal>>(key) ?: emptyList()

// View extension functions
private fun View?.setVisibleOrGone(visible: Boolean) {
Expand Down Expand Up @@ -441,7 +438,6 @@ class GutenbergKitEditorFragment : GutenbergKitEditorFragmentBase() {
val editorAssetsEndpoint = "${siteApiRoot}wpcom/v2/${firstNamespace}editor-assets"
val cookies = getSetting<Map<String, String>>("cookies") ?: emptyMap()
val namespaceExcludedPaths = getStringArray("namespaceExcludedPaths")
val webViewGlobals = getWebViewGlobals("webViewGlobals")

EditorConfiguration.Builder()
.setTitle(getSetting<String>("postTitle") ?: "")
Expand All @@ -454,7 +450,6 @@ class GutenbergKitEditorFragment : GutenbergKitEditorFragmentBase() {
.setSiteApiNamespace(siteApiNamespace)
.setNamespaceExcludedPaths(namespaceExcludedPaths)
.setAuthHeader(getSetting<String>("authHeader") ?: "")
.setWebViewGlobals(webViewGlobals)
.setEditorSettings(editorSettings)
.setLocale(getSetting<String>("locale"))
.setEditorAssetsEndpoint(editorAssetsEndpoint)
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ google-play-services-auth = '20.4.1'
google-services = '4.4.3'
gravatar = '2.5.0'
greenrobot-eventbus = '3.3.1'
gutenberg-kit = 'v0.8.0-alpha.0'
gutenberg-kit = 'v0.8.0-alpha.2'
gutenberg-mobile = 'v1.121.0'
indexos-media-for-mobile = '43a9026f0973a2f0a74fa813132f6a16f7499c3a'
jackson-databind = '2.12.7.1'
Expand Down