Skip to content

Commit

Permalink
Merge pull request #16935 from wordpress-mobile/gutenberg/send-host-a…
Browse files Browse the repository at this point in the history
…pp-namespace-to-gutenberg

[Gutenberg Mobile] Enable the native editor to receive a host app's namespace
  • Loading branch information
Siobhan Bamber authored Jul 26, 2022
2 parents 51280dc + e6ed592 commit 870aeb8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
import org.wordpress.android.util.AppLog;
import org.wordpress.android.util.AppLog.T;
import org.wordpress.android.util.AutolinkUtils;
import org.wordpress.android.util.BuildConfigWrapper;
import org.wordpress.android.util.DateTimeUtilsWrapper;
import org.wordpress.android.util.DisplayUtils;
import org.wordpress.android.util.FluxCUtils;
Expand Down Expand Up @@ -395,6 +396,7 @@ enum RestartEditorOptions {
@Inject EditorTracker mEditorTracker;
@Inject UploadUtilsWrapper mUploadUtilsWrapper;
@Inject EditorActionsProvider mEditorActionsProvider;
@Inject BuildConfigWrapper mBuildConfigWrapper;
@Inject DateTimeUtilsWrapper mDateTimeUtils;
@Inject ViewModelProvider.Factory mViewModelFactory;
@Inject ReaderUtilsWrapper mReaderUtilsWrapper;
Expand Down Expand Up @@ -2341,6 +2343,8 @@ private GutenbergPropsBuilder getGutenbergPropsBuilder() {
boolean isWPComSite = mSite.isWPCom() || mSite.isWPComAtomic();
boolean shouldUseFastImage = !mSite.isPrivate() && !mSite.isPrivateWPComAtomic();

String hostAppNamespace = mBuildConfigWrapper.isJetpackApp() ? "Jetpack" : "WordPress";

return new GutenbergPropsBuilder(
SiteUtils.supportsContactInfoFeature(mSite),
SiteUtils.supportsLayoutGridFeature(mSite),
Expand All @@ -2359,6 +2363,7 @@ private GutenbergPropsBuilder getGutenbergPropsBuilder() {
isWPComSite,
wpcomLocaleSlug,
postType,
hostAppNamespace,
featuredImageId,
themeBundle
);
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
ext {
wordPressUtilsVersion = 'trunk-68e2995962a5134770e6f9e5b9f258a339e123b2'
wordPressLoginVersion = '0.15.0'
gutenbergMobileVersion = 'v1.80.0'
gutenbergMobileVersion = 'v1.81.0-alpha1'
storiesVersion = '1.4.0'
aboutAutomatticVersion = '0.0.6'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ data class GutenbergPropsBuilder(
private val enableReusableBlock: Boolean,
private val localeSlug: String,
private val postType: String,
private val hostAppNamespace: String,
private val featuredImageId: Int,
private val editorTheme: Bundle?
) : Parcelable {
Expand All @@ -48,6 +49,7 @@ data class GutenbergPropsBuilder(
enableReusableBlock = enableReusableBlock,
localeSlug = localeSlug,
postType = postType,
hostAppNamespace = hostAppNamespace,
featuredImageId = featuredImageId,
editorTheme = editorTheme,
translations = GutenbergUtils.getTranslations(activity),
Expand Down

0 comments on commit 870aeb8

Please sign in to comment.