mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Add support for call log mark as read.
This commit is contained in:
@@ -1197,16 +1197,23 @@ object SyncMessageProcessor {
|
||||
}
|
||||
|
||||
private fun handleSynchronizeCallLogEvent(callLogEvent: CallLogEvent, envelopeTimestamp: Long) {
|
||||
if (callLogEvent.type != CallLogEvent.Type.CLEAR) {
|
||||
log(envelopeTimestamp, "Synchronize call log event has an invalid type ${callLogEvent.type}, ignoring.")
|
||||
return
|
||||
} else if (callLogEvent.timestamp == null) {
|
||||
if (callLogEvent.timestamp == null) {
|
||||
log(envelopeTimestamp, "Synchronize call log event has null timestamp")
|
||||
return
|
||||
}
|
||||
|
||||
SignalDatabase.calls.deleteNonAdHocCallEventsOnOrBefore(callLogEvent.timestamp!!)
|
||||
SignalDatabase.callLinks.deleteNonAdminCallLinksOnOrBefore(callLogEvent.timestamp!!)
|
||||
when (callLogEvent.type) {
|
||||
CallLogEvent.Type.CLEAR -> {
|
||||
SignalDatabase.calls.deleteNonAdHocCallEventsOnOrBefore(callLogEvent.timestamp!!)
|
||||
SignalDatabase.callLinks.deleteNonAdminCallLinksOnOrBefore(callLogEvent.timestamp!!)
|
||||
}
|
||||
|
||||
CallLogEvent.Type.MARKED_AS_READ -> {
|
||||
SignalDatabase.calls.markAllCallEventsRead(callLogEvent.timestamp!!)
|
||||
}
|
||||
|
||||
else -> log(envelopeTimestamp, "Synchronize call log event has an invalid type ${callLogEvent.type}, ignoring.")
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleSynchronizeCallLink(callLinkUpdate: CallLinkUpdate, envelopeTimestamp: Long) {
|
||||
|
||||
Reference in New Issue
Block a user