mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 16:47:42 +00:00
Legacy expiration type ui default tweaks
This commit is contained in:
@@ -5,11 +5,11 @@ import org.session.libsignal.protos.SignalServiceProtos.Content.ExpirationType
|
||||
class ExpirationConfiguration(
|
||||
val threadId: Long = -1,
|
||||
val durationSeconds: Int = 0,
|
||||
val expirationTypeValue: Int? = null,
|
||||
val expirationTypeValue: Int = -1,
|
||||
val updatedTimestampMs: Long = 0
|
||||
) {
|
||||
val isEnabled = durationSeconds > 0
|
||||
val expirationType = expirationTypeValue?.let { ExpirationType.valueOf(it) }
|
||||
val expirationType: ExpirationType? = ExpirationType.valueOf(expirationTypeValue)
|
||||
|
||||
companion object {
|
||||
val isNewConfigEnabled = System.currentTimeMillis() > 1_674_000_000_000 // 18/01/2023
|
||||
|
@@ -98,7 +98,7 @@ fun updateExpirationConfigurationIfNeeded(message: Message, proto: SignalService
|
||||
val remoteConfig = ExpirationConfiguration(
|
||||
threadID,
|
||||
durationSeconds,
|
||||
type?.number,
|
||||
type?.number ?: -1,
|
||||
proto.lastDisappearingMessageChangeTimestamp
|
||||
)
|
||||
storage.setExpirationConfiguration(remoteConfig)
|
||||
|
Reference in New Issue
Block a user