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
3
3
import kotlin.time.Duration.Companion.seconds
4
4
5
5
sealed class ExpiryMode (val expirySeconds : Long ) {
6
- object NONE: ExpiryMode(0 )
6
+ data object NONE : ExpiryMode (0 )
7
7
data class AfterSend (private val seconds : Long = 0L ): ExpiryMode(seconds)
8
8
data class AfterRead (private val seconds : Long = 0L ): ExpiryMode(seconds)
9
9
@@ -14,4 +14,4 @@ sealed class ExpiryMode(val expirySeconds: Long) {
14
14
fun coerceSendToRead (coerce : Boolean = true) = if (coerce && this is AfterSend ) AfterRead (expirySeconds) else this
15
15
}
16
16
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