File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
WooCommerce/src/main/kotlin/com/woocommerce/android/ciab Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ package com.woocommerce.android.ciab
2+
3+ enum class CIABAffectedFeature {
4+ Blaze ,
5+ Payments ,
6+ WooShippingSplitShipments ,
7+ GroupedProducts ,
8+ VariableProducts ,
9+ GiftCardEditing ,
10+ ProductsStockDashboardCard
11+ }
Original file line number Diff line number Diff line change 1+ package com.woocommerce.android.ciab
2+
3+ import androidx.annotation.VisibleForTesting
4+ import com.woocommerce.android.tools.SelectedSite
5+ import javax.inject.Inject
6+
7+ class CIABSiteGateKeeper @Inject constructor(private val selectedSite : SelectedSite ) {
8+ fun isFeatureSupported (
9+ @Suppress(" unused" )
10+ feature : CIABAffectedFeature
11+ ): Boolean {
12+ // For now, all affected features are unsupported in CIAB.
13+ // If there are exceptions in the future, we can handle them here.
14+ return ! isCurrentSiteCIAB()
15+ }
16+
17+ fun isFeatureUnsupported (feature : CIABAffectedFeature ): Boolean {
18+ return ! isFeatureSupported(feature)
19+ }
20+
21+ private fun isCurrentSiteCIAB (): Boolean {
22+ TODO ()
23+ }
24+
25+ companion object Companion {
26+ @VisibleForTesting
27+ const val CIAB_GARDEN_NAME = " commerce"
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments