File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
library/src/main/java/network/loki/messenger/libsession_util/util Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package network.loki.messenger.libsession_util.util
33import kotlin.time.Duration.Companion.seconds
44
55sealed class ExpiryMode (val expirySeconds : Long ) {
6- object NONE: ExpiryMode(0 )
6+ data object NONE : ExpiryMode (0 )
77 data class AfterSend (private val seconds : Long = 0L ): ExpiryMode(seconds)
88 data class AfterRead (private val seconds : Long = 0L ): ExpiryMode(seconds)
99
@@ -14,4 +14,4 @@ sealed class ExpiryMode(val expirySeconds: Long) {
1414 fun coerceSendToRead (coerce : Boolean = true) = if (coerce && this is AfterSend ) AfterRead (expirySeconds) else this
1515}
1616
17- fun afterSend (seconds : Long ) = seconds.takeIf { it > 0 }?.let (ExpiryMode ::AfterSend ) ? : ExpiryMode .NONE
17+ fun afterSend (seconds : Long ) = seconds.takeIf { it > 0 }?.let (ExpiryMode ::AfterSend ) ? : ExpiryMode .NONE
You can’t perform that action at this time.
0 commit comments