Skip to content

Commit

Permalink
Merge pull request #21413 from wordpress-mobile/issue/21412-features-…
Browse files Browse the repository at this point in the history
…in-dev

Remove GlobalStyleSupportFeatureConfig
  • Loading branch information
nbradbury authored Nov 4, 2024
2 parents b9405f4 + fe1d14a commit cae7acb
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 33 deletions.
1 change: 0 additions & 1 deletion WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ android {
buildConfigField "String", "PUSH_NOTIFICATIONS_APP_KEY", '"org.wordpress.android"'
buildConfigField "boolean", "MP4_COMPOSER_VIDEO_OPTIMIZATION", "false"
buildConfigField "boolean", "MANAGE_CATEGORIES", "false"
buildConfigField "boolean", "GLOBAL_STYLE_SUPPORT", "true"
buildConfigField "boolean", "QUICK_START_DYNAMIC_CARDS", "false"
buildConfigField "boolean", "RECOMMEND_THE_APP", "false"
buildConfigField "boolean", "UNIFIED_COMMENTS_DETAILS", "false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import org.wordpress.android.fluxc.store.EditorThemeStore
import org.wordpress.android.ui.prefs.AppPrefs
import org.wordpress.android.ui.prefs.AppPrefsWrapper
import org.wordpress.android.ui.prefs.SiteSettingsInterfaceWrapper
import org.wordpress.android.util.config.GlobalStyleSupportFeatureConfig
import org.wordpress.android.util.mapSafe
import javax.inject.Inject
import javax.inject.Singleton
Expand All @@ -21,7 +20,6 @@ class SelectedSiteRepository @Inject constructor(
private val dispatcher: Dispatcher,
private val siteSettingsInterfaceFactory: SiteSettingsInterfaceWrapper.Factory,
private val appPrefsWrapper: AppPrefsWrapper,
private val globalStyleSupportFeatureConfig: GlobalStyleSupportFeatureConfig,
) {
private var siteSettings: SiteSettingsInterfaceWrapper? = null

Expand Down Expand Up @@ -95,7 +93,7 @@ class SelectedSiteRepository @Inject constructor(
}

private fun fetchEditorTheme(site: SiteModel) {
EditorThemeStore.FetchEditorThemePayload(site, globalStyleSupportFeatureConfig.isEnabled()).let {
EditorThemeStore.FetchEditorThemePayload(site, gssEnabled = true).let {
dispatcher.dispatch(EditorThemeActionBuilder.newFetchEditorThemeAction(it))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ import org.wordpress.android.util.analytics.AnalyticsTrackerWrapper
import org.wordpress.android.util.analytics.AnalyticsUtils
import org.wordpress.android.util.analytics.AnalyticsUtils.BlockEditorEnabledSource
import org.wordpress.android.util.config.ContactSupportFeatureConfig
import org.wordpress.android.util.config.GlobalStyleSupportFeatureConfig
import org.wordpress.android.util.config.PostConflictResolutionFeatureConfig
import org.wordpress.android.util.config.NewGutenbergFeatureConfig
import org.wordpress.android.util.config.NewGutenbergThemeStylesFeatureConfig
Expand Down Expand Up @@ -399,8 +398,6 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm

@Inject lateinit var updateFeaturedImageUseCase: UpdateFeaturedImageUseCase

@Inject lateinit var globalStyleSupportFeatureConfig: GlobalStyleSupportFeatureConfig

@Inject lateinit var zendeskHelper: ZendeskHelper

@Inject lateinit var bloggingPromptsStore: BloggingPromptsStore
Expand Down Expand Up @@ -3933,7 +3930,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
}

private fun refreshEditorTheme() {
val payload = FetchEditorThemePayload(siteModel, globalStyleSupportFeatureConfig.isEnabled())
val payload = FetchEditorThemePayload(siteModel, gssEnabled = true)
dispatcher.dispatch(EditorThemeActionBuilder.newFetchEditorThemeAction(payload))
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import org.wordpress.android.ui.utils.UiString
import org.wordpress.android.util.AppLog
import org.wordpress.android.util.LocaleManagerWrapper
import org.wordpress.android.util.SiteUtils
import org.wordpress.android.util.config.GlobalStyleSupportFeatureConfig
import org.wordpress.android.util.config.SiteEditorMVPFeatureConfig
import org.wordpress.android.util.extensions.toFormattedDateString
import org.wordpress.android.viewmodel.ScopedViewModel
Expand All @@ -70,7 +69,6 @@ class PageListViewModel @Inject constructor(
private val dispatcher: Dispatcher,
private val localeManagerWrapper: LocaleManagerWrapper,
private val accountStore: AccountStore,
private val globalStyleSupportFeatureConfig: GlobalStyleSupportFeatureConfig,
private val editorThemeStore: EditorThemeStore,
private val siteEditorMVPFeatureConfig: SiteEditorMVPFeatureConfig,
private val blazeFeatureUtils: BlazeFeatureUtils,
Expand Down Expand Up @@ -167,7 +165,7 @@ class PageListViewModel @Inject constructor(
isBlockBasedTheme.value = editorThemeStore.getIsBlockBasedTheme(pagesViewModel.site)

// Dispatch action to refresh the values from the remote
FetchEditorThemePayload(pagesViewModel.site, globalStyleSupportFeatureConfig.isEnabled()).let {
FetchEditorThemePayload(pagesViewModel.site, gssEnabled = true).let {
dispatcher.dispatch(EditorThemeActionBuilder.newFetchEditorThemeAction(it))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import org.wordpress.android.fluxc.annotations.action.Action
import org.wordpress.android.fluxc.model.SiteModel
import org.wordpress.android.ui.prefs.AppPrefsWrapper
import org.wordpress.android.ui.prefs.SiteSettingsInterfaceWrapper
import org.wordpress.android.util.config.GlobalStyleSupportFeatureConfig

@ExperimentalCoroutinesApi
class SelectedSiteRepositoryTest : BaseUnitTest() {
Expand All @@ -37,9 +36,6 @@ class SelectedSiteRepositoryTest : BaseUnitTest() {
@Mock
lateinit var appPrefsWrapper: AppPrefsWrapper

@Mock
lateinit var globalStyleSupportFeatureConfig: GlobalStyleSupportFeatureConfig

private lateinit var siteModel: SiteModel
private var siteIconProgressBarVisible: Boolean = false
private var selectedSite: SiteModel? = null
Expand All @@ -56,7 +52,6 @@ class SelectedSiteRepositoryTest : BaseUnitTest() {
dispatcher,
siteSettingsInterfaceFactory,
appPrefsWrapper,
globalStyleSupportFeatureConfig
)
selectedSiteRepository.showSiteIconProgressBar.observeForever { siteIconProgressBarVisible = it == true }
selectedSiteRepository.selectedSiteChange.observeForever { selectedSite = it }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import org.wordpress.android.ui.posts.AuthorFilterSelection
import org.wordpress.android.ui.posts.AuthorFilterSelection.EVERYONE
import org.wordpress.android.ui.posts.AuthorFilterSelection.ME
import org.wordpress.android.util.LocaleManagerWrapper
import org.wordpress.android.util.config.GlobalStyleSupportFeatureConfig
import org.wordpress.android.util.config.SiteEditorMVPFeatureConfig
import org.wordpress.android.viewmodel.pages.PageListViewModel.PageListState
import org.wordpress.android.viewmodel.pages.PageListViewModel.PageListType.PUBLISHED
Expand Down Expand Up @@ -79,9 +78,6 @@ class PageListViewModelTest : BaseUnitTest() {
@Mock
lateinit var accountStore: AccountStore

@Mock
lateinit var globalStyleSupportFeatureConfig: GlobalStyleSupportFeatureConfig

@Mock
lateinit var siteEditorMVPFeatureConfig: SiteEditorMVPFeatureConfig

Expand Down Expand Up @@ -114,7 +110,6 @@ class PageListViewModelTest : BaseUnitTest() {
dispatcher,
localeManagerWrapper,
accountStore,
globalStyleSupportFeatureConfig,
editorThemeStore,
siteEditorMVPFeatureConfig,
blazeFeatureUtils,
Expand Down

0 comments on commit cae7acb

Please sign in to comment.