Add bottom sheet reminder for linked devices on re-register.

This commit is contained in:
Nicholas
2023-03-02 11:32:59 -05:00
committed by Greyson Parrelli
parent 8ca8e5d8f9
commit 428ef554a3
8 changed files with 140 additions and 5 deletions

View File

@@ -5,10 +5,8 @@ import androidx.annotation.Nullable;
import org.thoughtcrime.securesms.database.model.databaseprotos.PendingChangeNumberMetadata;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
public final class MiscellaneousValues extends SignalStoreValues {
@@ -30,6 +28,7 @@ public final class MiscellaneousValues extends SignalStoreValues {
private static final String LAST_FOREGROUND_TIME = "misc.last_foreground_time";
private static final String PNI_INITIALIZED_DEVICES = "misc.pni_initialized_devices";
private static final String SMS_PHASE_1_START_MS = "misc.sms_export.phase_1_start.3";
private static final String LINKED_DEVICES_REMINDER = "misc.linked_devices_reminder";
MiscellaneousValues(@NonNull KeyValueStore store) {
super(store);
@@ -242,4 +241,12 @@ public final class MiscellaneousValues extends SignalStoreValues {
long phase1StartMs = getLong(SMS_PHASE_1_START_MS, now);
return phase1StartMs + SmsExportPhase.PHASE_3.getDuration();
}
public void setShouldShowLinkedDevicesReminder(boolean value) {
putBoolean(LINKED_DEVICES_REMINDER, value);
}
public boolean getShouldShowLinkedDevicesReminder() {
return getBoolean(LINKED_DEVICES_REMINDER, false);
}
}