mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Support enabling stories access by country.
This commit is contained in:
committed by
Cody Henthorne
parent
a98cc5706f
commit
6c4c299b28
@@ -105,6 +105,7 @@ public final class FeatureFlags {
|
||||
private static final String CDS_V2_LOAD_TEST = "android.cdsV2LoadTest";
|
||||
private static final String SMS_EXPORTER = "android.sms.exporter";
|
||||
private static final String CDS_V2_COMPAT = "android.cdsV2Compat.3";
|
||||
public static final String STORIES_LOCALE = "android.stories.locale";
|
||||
|
||||
/**
|
||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||
@@ -161,7 +162,8 @@ public final class FeatureFlags {
|
||||
RECIPIENT_MERGE_V2,
|
||||
CDS_V2_LOAD_TEST,
|
||||
SMS_EXPORTER,
|
||||
CDS_V2_COMPAT
|
||||
CDS_V2_COMPAT,
|
||||
STORIES_LOCALE
|
||||
);
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -481,6 +483,13 @@ public final class FeatureFlags {
|
||||
return getBoolean(STORIES_TEXT_FUNCTIONS, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* List of locales in which stories have been enabled. Overridden by the stories flag.
|
||||
*/
|
||||
public static @NonNull String storiesLocale() {
|
||||
return getString(STORIES_LOCALE, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not donor badges should be displayed throughout the app.
|
||||
*/
|
||||
|
||||
@@ -44,6 +44,13 @@ public final class LocaleFeatureFlags {
|
||||
return Optional.ofNullable(PushMediaConstraints.MediaConfig.forLevel(level));
|
||||
}
|
||||
|
||||
/**
|
||||
* In story group for given country code
|
||||
*/
|
||||
public static boolean isInStoriesCountry() {
|
||||
return isEnabled(FeatureFlags.STORIES_LOCALE, FeatureFlags.storiesLocale());
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not you should suggest SMS during onboarding.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user