mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Update linked devices screen.
This commit is contained in:
@@ -210,13 +210,7 @@ object DateUtils : android.text.format.DateUtils() {
|
||||
return if (isSameDay(System.currentTimeMillis(), timestamp)) {
|
||||
context.getString(R.string.DeviceListItem_today)
|
||||
} else {
|
||||
val format: String = when {
|
||||
timestamp.isWithin(6.days) -> "EEE "
|
||||
timestamp.isWithin(365.days) -> "MMM d"
|
||||
else -> "MMM d, yyy"
|
||||
}
|
||||
|
||||
timestamp.toDateString(format, locale)
|
||||
timestamp.toDateString("dd/MM/yy", locale)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -129,6 +129,7 @@ public final class FeatureFlags {
|
||||
private static final String RESTORE_POST_REGISTRATION = "android.registration.restorePostRegistration";
|
||||
private static final String LIBSIGNAL_WEB_SOCKET_SHADOW_PCT = "android.libsignalWebSocketShadowingPercentage";
|
||||
private static final String DELETE_SYNC_SEND_RECEIVE = "android.deleteSyncSendReceive";
|
||||
private static final String LINKED_DEVICES_V2 = "android.linkedDevices.v2";
|
||||
|
||||
/**
|
||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||
@@ -211,7 +212,7 @@ public final class FeatureFlags {
|
||||
);
|
||||
|
||||
@VisibleForTesting
|
||||
static final Set<String> NOT_REMOTE_CAPABLE = SetUtil.newHashSet(MESSAGE_BACKUPS, REGISTRATION_V2, RESTORE_POST_REGISTRATION);
|
||||
static final Set<String> NOT_REMOTE_CAPABLE = SetUtil.newHashSet(MESSAGE_BACKUPS, REGISTRATION_V2, RESTORE_POST_REGISTRATION, LINKED_DEVICES_V2);
|
||||
|
||||
/**
|
||||
* Values in this map will take precedence over any value. This should only be used for local
|
||||
@@ -750,6 +751,11 @@ public final class FeatureFlags {
|
||||
return getBoolean(DELETE_SYNC_SEND_RECEIVE, false);
|
||||
}
|
||||
|
||||
/** Whether or not to use V2 of linked devices. */
|
||||
public static boolean linkedDevicesV2() {
|
||||
return getBoolean(LINKED_DEVICES_V2, false);
|
||||
}
|
||||
|
||||
/** Only for rendering debug info. */
|
||||
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
|
||||
return new TreeMap<>(REMOTE_VALUES);
|
||||
|
||||
Reference in New Issue
Block a user