Mark all call events as read whenever we enter the calls tab.

This commit is contained in:
Alex Hart
2023-04-13 16:35:00 -03:00
committed by Greyson Parrelli
parent ee89629738
commit 2a16d8baed
4 changed files with 19 additions and 1 deletions

View File

@@ -1307,6 +1307,13 @@ open class MessageTable(context: Context?, databaseHelper: SignalDatabase) : Dat
return markedMessageInfos
}
fun markAllCallEventsRead(): List<MarkedMessageInfo> {
val where = "$IS_CALL_TYPE_CLAUSE AND $READ = 0"
val markedMessageInfos = setMessagesRead(where, null)
notifyConversationListListeners()
return markedMessageInfos
}
fun markAllFailedStoriesNotified() {
val where = "$IS_STORY_CLAUSE AND (${getOutgoingTypeClause()}) AND $NOTIFIED = 0 AND ($TYPE & ${MessageTypes.BASE_TYPE_MASK}) = ${MessageTypes.BASE_SENT_FAILED_TYPE}"