Merge branch 'master' into add-sms-draft
This commit is contained in:
commit
02a8633ffd
2 changed files with 15 additions and 0 deletions
|
|
@ -813,6 +813,17 @@ fun Context.deleteSmsDraft(threadId: Long) {
|
|||
contentResolver.delete(uri, null, null)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun Context.updateLastConversationMessage(threadId: Long) {
|
||||
val uri = Threads.CONTENT_URI
|
||||
val selection = "${Threads._ID} = ?"
|
||||
val selectionArgs = arrayOf(threadId.toString())
|
||||
try {
|
||||
contentResolver.delete(uri, selection, selectionArgs)
|
||||
val newConversation = getConversations(threadId)[0]
|
||||
conversationsDB.insertOrUpdate(newConversation)
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue