mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Implement username is out of sync banner.
This commit is contained in:
committed by
Greyson Parrelli
parent
4954be109c
commit
a398745740
@@ -11,9 +11,10 @@ import java.util.List;
|
||||
|
||||
public final class PhoneNumberPrivacyValues extends SignalStoreValues {
|
||||
|
||||
public static final String SHARING_MODE = "phoneNumberPrivacy.sharingMode";
|
||||
public static final String LISTING_MODE = "phoneNumberPrivacy.listingMode";
|
||||
public static final String LISTING_TIMESTAMP = "phoneNumberPrivacy.listingMode.timestamp";
|
||||
public static final String SHARING_MODE = "phoneNumberPrivacy.sharingMode";
|
||||
public static final String LISTING_MODE = "phoneNumberPrivacy.listingMode";
|
||||
public static final String LISTING_TIMESTAMP = "phoneNumberPrivacy.listingMode.timestamp";
|
||||
public static final String USERNAME_OUT_OF_SYNC = "phoneNumberPrivacy.usernameOutOfSync";
|
||||
|
||||
private static final Collection<CertificateType> REGULAR_CERTIFICATE = Collections.singletonList(CertificateType.UUID_AND_E164);
|
||||
private static final Collection<CertificateType> PRIVACY_CERTIFICATE = Collections.singletonList(CertificateType.UUID_ONLY);
|
||||
@@ -68,6 +69,18 @@ public final class PhoneNumberPrivacyValues extends SignalStoreValues {
|
||||
return getLong(LISTING_TIMESTAMP, 0);
|
||||
}
|
||||
|
||||
public void markUsernameOutOfSync() {
|
||||
putBoolean(USERNAME_OUT_OF_SYNC, true);
|
||||
}
|
||||
|
||||
public void clearUsernameOutOfSync() {
|
||||
putBoolean(USERNAME_OUT_OF_SYNC, false);
|
||||
}
|
||||
|
||||
public boolean isUsernameOutOfSync() {
|
||||
return getBoolean(USERNAME_OUT_OF_SYNC, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* If you respect {@link #getPhoneNumberSharingMode}, then you will only ever need to fetch and store
|
||||
* these certificates types.
|
||||
|
||||
Reference in New Issue
Block a user