File tree Expand file tree Collapse file tree 4 files changed +11
-7
lines changed
WooCommerce/src/main/kotlin/com/woocommerce/android Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 11package com.woocommerce.android.ui.woopos.featureflags
22
3- import com.woocommerce.android.util.FeatureFlag
3+ import com.woocommerce.android.util.IsRemoteFeatureFlagEnabled
4+ import com.woocommerce.android.util.RemoteFeatureFlag.REMOTE_WOO_POS_LOCAL_CATALOG_M1
45import javax.inject.Inject
56
67@Suppress(" unused" )
7- class WooPosLocalCatalogM1Enabled @Inject constructor() {
8- operator fun invoke (): Boolean {
9- return FeatureFlag .WOO_POS_LOCAL_CATALOG_M1 .isEnabled()
8+ class WooPosLocalCatalogM1Enabled @Inject constructor(
9+ private val isRemoteFeatureFlagEnabled : IsRemoteFeatureFlagEnabled
10+ ) {
11+ suspend operator fun invoke (): Boolean {
12+ return isRemoteFeatureFlagEnabled(REMOTE_WOO_POS_LOCAL_CATALOG_M1 )
1013 }
1114}
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ enum class FeatureFlag {
1010 WC_SHIPPING_BANNER ,
1111 BETTER_CUSTOMER_SEARCH_M2 ,
1212 ORDER_CREATION_AUTO_TAX_RATE ,
13- WOO_POS_LOCAL_CATALOG_M1 ,
1413 BOOKINGS_MVP ;
1514
1615 fun isEnabled (context : Context ? = null): Boolean {
@@ -22,7 +21,6 @@ enum class FeatureFlag {
2221 WC_SHIPPING_BANNER ,
2322 BETTER_CUSTOMER_SEARCH_M2 ,
2423 ORDER_CREATION_AUTO_TAX_RATE ,
25- WOO_POS_LOCAL_CATALOG_M1 ,
2624 BOOKINGS_MVP -> PackageUtils .isDebugBuild()
2725 }
2826 }
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import com.woocommerce.android.util.RemoteFeatureFlag.APP_PASSWORDS_FOR_JETPACK_
55import com.woocommerce.android.util.RemoteFeatureFlag.LOCAL_NOTIFICATION_1D_AFTER_FREE_TRIAL_EXPIRES
66import com.woocommerce.android.util.RemoteFeatureFlag.LOCAL_NOTIFICATION_1D_BEFORE_FREE_TRIAL_EXPIRES
77import com.woocommerce.android.util.RemoteFeatureFlag.LOCAL_NOTIFICATION_STORE_CREATION_READY
8+ import com.woocommerce.android.util.RemoteFeatureFlag.REMOTE_WOO_POS_LOCAL_CATALOG_M1
89import com.woocommerce.android.util.RemoteFeatureFlag.WOO_POS
910import javax.inject.Inject
1011
@@ -17,6 +18,7 @@ class IsRemoteFeatureFlagEnabled @Inject constructor(
1718 LOCAL_NOTIFICATION_1D_BEFORE_FREE_TRIAL_EXPIRES ,
1819 LOCAL_NOTIFICATION_1D_AFTER_FREE_TRIAL_EXPIRES ,
1920 WOO_POS ,
21+ REMOTE_WOO_POS_LOCAL_CATALOG_M1 ,
2022 APP_PASSWORDS_FOR_JETPACK_SITES ->
2123 PackageUtils .isDebugBuild() ||
2224 wpComRemoteFeatureFlagRepository.isRemoteFeatureFlagEnabled(featureFlag.remoteKey)
Original file line number Diff line number Diff line change @@ -5,5 +5,6 @@ enum class RemoteFeatureFlag(val remoteKey: String) {
55 LOCAL_NOTIFICATION_1D_BEFORE_FREE_TRIAL_EXPIRES (" woo_notification_1d_before_free_trial_expires" ),
66 LOCAL_NOTIFICATION_1D_AFTER_FREE_TRIAL_EXPIRES (" woo_notification_1d_after_free_trial_expires" ),
77 WOO_POS (" woo_pos" ),
8- APP_PASSWORDS_FOR_JETPACK_SITES (" woo_app_passwords_for_jetpack_sites" )
8+ APP_PASSWORDS_FOR_JETPACK_SITES (" woo_app_passwords_for_jetpack_sites" ),
9+ REMOTE_WOO_POS_LOCAL_CATALOG_M1 (" woo_pos_local_catalog_m1" ),
910}
You can’t perform that action at this time.
0 commit comments