@@ -235,8 +235,8 @@ import org.wordpress.android.util.analytics.AnalyticsUtils
235
235
import org.wordpress.android.util.analytics.AnalyticsUtils.BlockEditorEnabledSource
236
236
import org.wordpress.android.util.config.ContactSupportFeatureConfig
237
237
import org.wordpress.android.util.config.PostConflictResolutionFeatureConfig
238
- import org.wordpress.android.util.config.NewGutenbergFeatureConfig
239
- import org.wordpress.android.util.config.NewGutenbergThemeStylesFeatureConfig
238
+ import org.wordpress.android.util.config.GutenbergKitFeatureConfig
239
+ import org.wordpress.android.util.config.GutenbergKitThemeStylesFeatureConfig
240
240
import org.wordpress.android.util.extensions.setLiftOnScrollTargetViewIdAndRequestLayout
241
241
import org.wordpress.android.util.helpers.MediaFile
242
242
import org.wordpress.android.util.helpers.MediaGallery
@@ -315,7 +315,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
315
315
private var isXPostsCapable: Boolean? = null
316
316
private var onGetSuggestionResult: Consumer <String ?>? = null
317
317
private var isVoiceContentSet = false
318
- private var isNewGutenbergEditor = false
318
+ private var isGutenbergKitEditor = false
319
319
320
320
// For opening the context menu after permissions have been granted
321
321
private var menuView: View ? = null
@@ -410,8 +410,8 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
410
410
411
411
@Inject lateinit var postConflictResolutionFeatureConfig: PostConflictResolutionFeatureConfig
412
412
413
- @Inject lateinit var newGutenbergFeatureConfig : NewGutenbergFeatureConfig
414
- @Inject lateinit var newGutenbergThemeStylesConfig : NewGutenbergThemeStylesFeatureConfig
413
+ @Inject lateinit var gutenbergKitFeatureConfig : GutenbergKitFeatureConfig
414
+ @Inject lateinit var gutenbergKitThemeStylesConfig : GutenbergKitThemeStylesFeatureConfig
415
415
416
416
@Inject lateinit var storePostViewModel: StorePostViewModel
417
417
@Inject lateinit var storageUtilsViewModel: StorageUtilsViewModel
@@ -517,7 +517,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
517
517
}
518
518
onBackPressedDispatcher.addCallback(this , callback)
519
519
dispatcher.register(this )
520
- isNewGutenbergEditor = newGutenbergFeatureConfig .isEnabled()
520
+ isGutenbergKitEditor = gutenbergKitFeatureConfig .isEnabled()
521
521
522
522
createEditShareMessageActivityResultLauncher()
523
523
@@ -726,7 +726,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
726
726
}
727
727
728
728
isNewPost = state.getBoolean(EditPostActivityConstants .STATE_KEY_IS_NEW_POST , false )
729
- isNewGutenbergEditor = state.getBoolean(EditPostActivityConstants .STATE_KEY_IS_NEW_GUTENBERG , false )
729
+ isGutenbergKitEditor = state.getBoolean(EditPostActivityConstants .STATE_KEY_IS_GUTENBERG_KIT , false )
730
730
isVoiceContentSet = state.getBoolean(EditPostActivityConstants .STATE_KEY_IS_VOICE_CONTENT_SET , false )
731
731
updatePostLoadingAndDialogState(
732
732
fromInt(
@@ -783,7 +783,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
783
783
}
784
784
785
785
private fun setupEditor () {
786
- if (isNewGutenbergEditor ) {
786
+ if (isGutenbergKitEditor ) {
787
787
GutenbergWebViewPool .getPreloadedWebView(getContext())
788
788
}
789
789
// Check whether to show the visual editor
@@ -1001,7 +1001,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
1001
1001
editorMedia.toastMessage.observe(this ) { event: Event <ToastMessageHolder ?> ->
1002
1002
event.getContentIfNotHandled()?.show(this )
1003
1003
}
1004
- if (! isNewGutenbergEditor ) {
1004
+ if (! isGutenbergKitEditor ) {
1005
1005
storePostViewModel.onSavePostTriggered.observe(this ) { unitEvent: Event <Unit > ->
1006
1006
unitEvent.applyIfNotHandled {
1007
1007
updateAndSavePostAsync()
@@ -1202,7 +1202,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
1202
1202
outState.putInt(EditPostActivityConstants .STATE_KEY_POST_LOADING_STATE , postLoadingState.value)
1203
1203
outState.putBoolean(EditPostActivityConstants .STATE_KEY_IS_NEW_POST , isNewPost)
1204
1204
outState.putBoolean(EditPostActivityConstants .STATE_KEY_IS_VOICE_CONTENT_SET , isVoiceContentSet)
1205
- outState.putBoolean(EditPostActivityConstants .STATE_KEY_IS_NEW_GUTENBERG , isNewGutenbergEditor )
1205
+ outState.putBoolean(EditPostActivityConstants .STATE_KEY_IS_GUTENBERG_KIT , isGutenbergKitEditor )
1206
1206
outState.putBoolean(
1207
1207
EditPostActivityConstants .STATE_KEY_IS_PHOTO_PICKER_VISIBLE ,
1208
1208
editorPhotoPicker?.isPhotoPickerShowing() ? : false
@@ -1412,11 +1412,11 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
1412
1412
val helpMenuItem = menu.findItem(R .id.menu_editor_help)
1413
1413
if (undoItem != null ) {
1414
1414
undoItem.setEnabled(menuHasUndo)
1415
- undoItem.setVisible(! htmlModeMenuStateOn && ! isNewGutenbergEditor )
1415
+ undoItem.setVisible(! htmlModeMenuStateOn && ! isGutenbergKitEditor )
1416
1416
}
1417
1417
if (redoItem != null ) {
1418
1418
redoItem.setEnabled(menuHasRedo)
1419
- redoItem.setVisible(! htmlModeMenuStateOn && ! isNewGutenbergEditor )
1419
+ redoItem.setVisible(! htmlModeMenuStateOn && ! isGutenbergKitEditor )
1420
1420
}
1421
1421
if (secondaryAction != null && editPostRepository.hasPost()) {
1422
1422
secondaryAction.setVisible(showMenuItems && this .secondaryAction.isVisible)
@@ -1463,7 +1463,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
1463
1463
}
1464
1464
val contentInfo = menu.findItem(R .id.menu_content_info)
1465
1465
(editorFragment as ? GutenbergEditorFragment )?.let { gutenbergEditorFragment ->
1466
- if (isNewGutenbergEditor ) {
1466
+ if (isGutenbergKitEditor ) {
1467
1467
contentInfo.isVisible = false
1468
1468
} else {
1469
1469
contentInfo.setOnMenuItemClickListener { _: MenuItem ? ->
@@ -2171,7 +2171,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
2171
2171
i.putExtra(EditPostActivityConstants .EXTRA_RESTART_EDITOR , restartEditorOption.name)
2172
2172
i.putExtra(EditPostActivityConstants .STATE_KEY_EDITOR_SESSION_DATA , postEditorAnalyticsSession)
2173
2173
i.putExtra(EditPostActivityConstants .EXTRA_IS_NEW_POST , isNewPost)
2174
- i.putExtra(EditPostActivityConstants .STATE_KEY_IS_NEW_GUTENBERG , isNewGutenbergEditor )
2174
+ i.putExtra(EditPostActivityConstants .STATE_KEY_IS_GUTENBERG_KIT , isGutenbergKitEditor )
2175
2175
setResult(RESULT_OK , i)
2176
2176
}
2177
2177
@@ -2401,7 +2401,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
2401
2401
override fun getItem (position : Int ): Fragment {
2402
2402
return when (position) {
2403
2403
PAGE_CONTENT -> {
2404
- if (isNewGutenbergEditor && showGutenbergEditor) {
2404
+ if (isGutenbergKitEditor && showGutenbergEditor) {
2405
2405
createGutenbergKitEditorFragment()
2406
2406
} else if (showGutenbergEditor) {
2407
2407
createGutenbergEditorFragment()
@@ -2456,7 +2456,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
2456
2456
" siteApiRoot" to siteApiRoot,
2457
2457
" authHeader" to authHeader,
2458
2458
" siteApiNamespace" to siteApiNamespace,
2459
- " themeStyles" to newGutenbergThemeStylesConfig .isEnabled()
2459
+ " themeStyles" to gutenbergKitThemeStylesConfig .isEnabled()
2460
2460
)
2461
2461
2462
2462
return GutenbergKitEditorFragment .newInstance(
@@ -2508,7 +2508,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
2508
2508
PAGE_CONTENT -> {
2509
2509
editorFragment = fragment as EditorFragmentAbstract
2510
2510
editorFragment?.setImageLoader(imageLoader)
2511
- if (isNewGutenbergEditor ) {
2511
+ if (isGutenbergKitEditor ) {
2512
2512
editorFragment?.onEditorContentChanged(object : GutenbergView .ContentChangeListener {
2513
2513
override fun onContentChanged (title : String , content : String ) {
2514
2514
storePostViewModel.savePostWithDelay()
@@ -3635,7 +3635,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
3635
3635
}
3636
3636
3637
3637
private fun updateVoiceContentIfNeeded () {
3638
- if (isNewGutenbergEditor ) {
3638
+ if (isGutenbergKitEditor ) {
3639
3639
return
3640
3640
}
3641
3641
// Check if voice content exists and this is a new post for a Gutenberg editor fragment
0 commit comments