mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Added support for blurring faces.
Co-authored-by: Alan Evans <alan@signal.org>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.thoughtcrime.securesms.keyvalue;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.OnLifecycleEvent;
|
||||
import androidx.preference.PreferenceDataStore;
|
||||
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||
@@ -19,6 +20,7 @@ public final class SignalStore {
|
||||
public static void onFirstEverAppLaunch() {
|
||||
registrationValues().onFirstEverAppLaunch();
|
||||
uiHints().onFirstEverAppLaunch();
|
||||
tooltips().onFirstEverAppLaunch();
|
||||
}
|
||||
|
||||
public static @NonNull KbsValues kbsValues() {
|
||||
@@ -41,6 +43,14 @@ public final class SignalStore {
|
||||
return new StorageServiceValues(getStore());
|
||||
}
|
||||
|
||||
public static @NonNull UiHints uiHints() {
|
||||
return new UiHints(getStore());
|
||||
}
|
||||
|
||||
public static @NonNull TooltipValues tooltips() {
|
||||
return new TooltipValues(getStore());
|
||||
}
|
||||
|
||||
public static @NonNull GroupsV2AuthorizationSignalStoreCache groupsV2AuthorizationCache() {
|
||||
return new GroupsV2AuthorizationSignalStoreCache(getStore());
|
||||
}
|
||||
@@ -61,10 +71,6 @@ public final class SignalStore {
|
||||
putLong(MESSAGE_REQUEST_ENABLE_TIME, time);
|
||||
}
|
||||
|
||||
public static UiHints uiHints() {
|
||||
return new UiHints(getStore());
|
||||
}
|
||||
|
||||
public static @NonNull PreferenceDataStore getPreferenceDataStore() {
|
||||
return new SignalPreferenceDataStore(getStore());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.thoughtcrime.securesms.keyvalue;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.whispersystems.signalservice.api.storage.StorageKey;
|
||||
|
||||
public class TooltipValues {
|
||||
|
||||
private static final String BLUR_HUD_ICON = "tooltip.blur_hud_icon";
|
||||
private static final String AUTO_BLUR_FACES = "tooltip.auto_blur_faces";
|
||||
|
||||
private final KeyValueStore store;
|
||||
|
||||
TooltipValues(@NonNull KeyValueStore store) {
|
||||
this.store = store;
|
||||
}
|
||||
|
||||
public void onFirstEverAppLaunch() {
|
||||
}
|
||||
|
||||
public boolean hasSeenBlurHudIconTooltip() {
|
||||
return store.getBoolean(BLUR_HUD_ICON, false);
|
||||
}
|
||||
|
||||
public void markBlurHudIconTooltipSeen() {
|
||||
store.beginWrite().putBoolean(BLUR_HUD_ICON, true).apply();
|
||||
}
|
||||
|
||||
public boolean hasSeenAutoBlurFacesTooltip() {
|
||||
return store.getBoolean(AUTO_BLUR_FACES, false);
|
||||
}
|
||||
|
||||
public void markAutoBlurFacesTooltipSeen() {
|
||||
store.beginWrite().putBoolean(AUTO_BLUR_FACES, true).apply();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user