-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21259 from wordpress-mobile/issue/self-hosted-use…
…rs-feature-flag Self hosted users feature flag
- Loading branch information
Showing
4 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
WordPress/src/main/java/org/wordpress/android/util/config/SelfHostedUsersFeatureConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.wordpress.android.util.config | ||
|
||
import org.wordpress.android.BuildConfig | ||
import org.wordpress.android.annotation.Feature | ||
import javax.inject.Inject | ||
|
||
/** | ||
* Configuration of the self-hosted users feature | ||
*/ | ||
private const val SELF_HOSTED_USERS_REMOTE_FIELD = "self_hosted_users" | ||
|
||
@Feature(SELF_HOSTED_USERS_REMOTE_FIELD, false) | ||
class SelfHostedUsersFeatureConfig | ||
@Inject constructor(appConfig: AppConfig) : FeatureConfig( | ||
appConfig, | ||
BuildConfig.ENABLE_SELF_HOSTED_USERS, | ||
SELF_HOSTED_USERS_REMOTE_FIELD | ||
) { | ||
override fun isEnabled(): Boolean { | ||
return super.isEnabled() && BuildConfig.DEBUG | ||
} | ||
} |