mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Add internal preferences under Advanced behind feature flag.
Initially for GV2 testing.
This commit is contained in:
committed by
Greyson Parrelli
parent
545ba80697
commit
e6a0e5b858
@@ -0,0 +1,20 @@
|
||||
package org.thoughtcrime.securesms.keyvalue;
|
||||
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags;
|
||||
|
||||
public final class InternalValues extends SignalStoreValues {
|
||||
|
||||
public static final String GV2_FORCE_INVITES = "internal.gv2.force_invites";
|
||||
|
||||
InternalValues(KeyValueStore store) {
|
||||
super(store);
|
||||
}
|
||||
|
||||
@Override
|
||||
void onFirstEverAppLaunch() {
|
||||
}
|
||||
|
||||
public synchronized boolean forceGv2Invites() {
|
||||
return FeatureFlags.internalUser() && getBoolean(GV2_FORCE_INVITES, false);
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ public final class SignalStore {
|
||||
private final UiHints uiHints;
|
||||
private final TooltipValues tooltipValues;
|
||||
private final MiscellaneousValues misc;
|
||||
private final InternalValues internalValues;
|
||||
|
||||
private SignalStore() {
|
||||
this.store = ApplicationDependencies.getKeyValueStore();
|
||||
@@ -34,6 +35,7 @@ public final class SignalStore {
|
||||
this.uiHints = new UiHints(store);
|
||||
this.tooltipValues = new TooltipValues(store);
|
||||
this.misc = new MiscellaneousValues(store);
|
||||
this.internalValues = new InternalValues(store);
|
||||
}
|
||||
|
||||
public static void onFirstEverAppLaunch() {
|
||||
@@ -45,6 +47,7 @@ public final class SignalStore {
|
||||
uiHints().onFirstEverAppLaunch();
|
||||
tooltips().onFirstEverAppLaunch();
|
||||
misc().onFirstEverAppLaunch();
|
||||
internalValues().onFirstEverAppLaunch();
|
||||
}
|
||||
|
||||
public static @NonNull KbsValues kbsValues() {
|
||||
@@ -79,6 +82,10 @@ public final class SignalStore {
|
||||
return INSTANCE.misc;
|
||||
}
|
||||
|
||||
public static @NonNull InternalValues internalValues() {
|
||||
return INSTANCE.internalValues;
|
||||
}
|
||||
|
||||
public static @NonNull GroupsV2AuthorizationSignalStoreCache groupsV2AuthorizationCache() {
|
||||
return new GroupsV2AuthorizationSignalStoreCache(getStore());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user