Adds isExpired method in events.
This commit is contained in:
@@ -1276,7 +1276,7 @@ object LocalCache {
|
|||||||
val now = TimeUtils.now()
|
val now = TimeUtils.now()
|
||||||
|
|
||||||
val toBeRemoved = notes.filter {
|
val toBeRemoved = notes.filter {
|
||||||
(it.value.event?.expiration() ?: Long.MAX_VALUE) < now
|
it.value.event?.isExpired() == true
|
||||||
}.values
|
}.values
|
||||||
|
|
||||||
val childrenToBeRemoved = mutableListOf<Note>()
|
val childrenToBeRemoved = mutableListOf<Note>()
|
||||||
|
|||||||
@@ -126,6 +126,8 @@ open class Event(
|
|||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun isExpired() = (expiration() ?: Long.MAX_VALUE) < TimeUtils.now()
|
||||||
|
|
||||||
override fun getTagOfAddressableKind(kind: Int): ATag? {
|
override fun getTagOfAddressableKind(kind: Int): ATag? {
|
||||||
val kindStr = kind.toString()
|
val kindStr = kind.toString()
|
||||||
val aTag = tags
|
val aTag = tags
|
||||||
|
|||||||
@@ -70,4 +70,5 @@ interface EventInterface {
|
|||||||
|
|
||||||
fun taggedEmojis(): List<EmojiUrl>
|
fun taggedEmojis(): List<EmojiUrl>
|
||||||
fun matchTag1With(text: String): Boolean
|
fun matchTag1With(text: String): Boolean
|
||||||
|
fun isExpired(): Boolean
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user