mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Do a CDS refresh when a new chat is created.
This commit is contained in:
committed by
Alex Hart
parent
40b4b316b3
commit
58b11f3c47
@@ -41,6 +41,7 @@ public final class MiscellaneousValues extends SignalStoreValues {
|
||||
private static final String LAST_SERVER_TIME_OFFSET_UPDATE = "misc.last_server_time_offset_update";
|
||||
private static final String NEEDS_USERNAME_RESTORE = "misc.needs_username_restore";
|
||||
private static final String LAST_FORCED_PREKEY_REFRESH = "misc.last_forced_prekey_refresh";
|
||||
private static final String LAST_CDS_FOREGROUND_SYNC = "misc.last_cds_foreground_sync";
|
||||
|
||||
MiscellaneousValues(@NonNull KeyValueStore store) {
|
||||
super(store);
|
||||
@@ -359,4 +360,18 @@ public final class MiscellaneousValues extends SignalStoreValues {
|
||||
public long getLastForcedPreKeyRefresh() {
|
||||
return getLong(LAST_FORCED_PREKEY_REFRESH, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* How long it's been since the last foreground CDS sync, which we do in response to new threads being created.
|
||||
*/
|
||||
public long getLastCdsForegroundSyncTime() {
|
||||
return getLong(LAST_CDS_FOREGROUND_SYNC, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the last time we did a foreground CDS sync.
|
||||
*/
|
||||
public void setLastCdsForegroundSyncTime(long time) {
|
||||
putLong(LAST_CDS_FOREGROUND_SYNC, time);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user