mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 16:49:40 +01:00
Enforce a local GV2 capacity limit driven by a feature flag.
This commit is contained in:
committed by
Greyson Parrelli
parent
cfcd451db7
commit
9da309ca48
@@ -65,6 +65,7 @@ public final class FeatureFlags {
|
||||
private static final String VERSIONED_PROFILES = "android.versionedProfiles";
|
||||
private static final String GROUPS_V2 = "android.groupsv2";
|
||||
private static final String GROUPS_V2_CREATE = "android.groupsv2.create";
|
||||
private static final String GROUPS_V2_CAPACITY = "android.groupsv2.capacity";
|
||||
|
||||
/**
|
||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||
@@ -87,6 +88,7 @@ public final class FeatureFlags {
|
||||
VERSIONED_PROFILES,
|
||||
GROUPS_V2,
|
||||
GROUPS_V2_CREATE,
|
||||
GROUPS_V2_CAPACITY,
|
||||
NEW_GROUP_UI
|
||||
);
|
||||
|
||||
@@ -283,6 +285,13 @@ public final class FeatureFlags {
|
||||
return groupsV2() && getBoolean(GROUPS_V2_CREATE, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Maximum number of members allowed in a group.
|
||||
*/
|
||||
public static int gv2GroupCapacity() {
|
||||
return getInteger(GROUPS_V2_CAPACITY, 100);
|
||||
}
|
||||
|
||||
/** Only for rendering debug info. */
|
||||
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
|
||||
return new TreeMap<>(REMOTE_VALUES);
|
||||
|
||||
Reference in New Issue
Block a user