You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-android/app/src/main/java/org/thoughtcrime/securesms/database/ExpirationInfo.kt

13 lines
340 B
Kotlin

package org.thoughtcrime.securesms.database
data class ExpirationInfo(
val id: Long,
val timestamp: Long,
val expiresIn: Long,
val expireStarted: Long,
val isMms: Boolean
) {
private fun isDisappearAfterSend() = timestamp == expireStarted
fun isDisappearAfterRead() = expiresIn > 0 && !isDisappearAfterSend()
}