We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93e041b commit 1be0010Copy full SHA for 1be0010
1 file changed
app/src/main/java/com/nextcloud/talk/conversationlist/ConversationsListActivity.kt
@@ -679,10 +679,9 @@ class ConversationsListActivity :
679
}
680
681
private fun isFutureEvent(conversation: ConversationModel): Boolean {
682
- if (!conversation.objectId.contains("#")) {
683
- return false
684
- }
685
- val eventTimeStart = conversation.objectId.split("#")[0].toLong()
+ val eventTimeStart = conversation.objectId
+ .substringBefore("#")
+ .toLongOrNull() ?: return false
686
val currentTimeStampInSeconds = System.currentTimeMillis() / LONG_1000
687
val sixteenHoursAfterTimeStamp = (eventTimeStart - currentTimeStampInSeconds) > SIXTEEN_HOURS_IN_SECONDS
688
return conversation.objectType == ConversationEnums.ObjectType.EVENT && sixteenHoursAfterTimeStamp
0 commit comments