Skip to content

Commit

Permalink
Fix - EditPostActivity - Only fetch for the block editor's settings e…
Browse files Browse the repository at this point in the history
…ndpoint for WPcom or Jepack enabled sites
  • Loading branch information
geriux committed Jun 24, 2024
1 parent d3d11b5 commit 42bebe3
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3874,8 +3874,11 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
}

private fun refreshEditorTheme() {
val payload = FetchEditorThemePayload(siteModel, globalStyleSupportFeatureConfig.isEnabled())
dispatcher.dispatch(EditorThemeActionBuilder.newFetchEditorThemeAction(payload))
val shouldLoadBlockEditorThemeData = siteModel.isWPCom || siteModel.isWPComAtomic || isJetpackSsoEnabled
if (shouldLoadBlockEditorThemeData) {
val payload = FetchEditorThemePayload(siteModel, globalStyleSupportFeatureConfig.isEnabled())
dispatcher.dispatch(EditorThemeActionBuilder.newFetchEditorThemeAction(payload))
}
}

@Suppress("unused")
Expand Down

0 comments on commit 42bebe3

Please sign in to comment.