mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
Making sure deleted control messages leave nothing behind
This commit is contained in:
parent
54ef260aa9
commit
7ed987b61a
@ -312,8 +312,8 @@ class ConversationViewModel(
|
|||||||
.mapNotNull { it.slideDeck.audioSlide }
|
.mapNotNull { it.slideDeck.audioSlide }
|
||||||
.forEach(::stopMessageAudio)
|
.forEach(::stopMessageAudio)
|
||||||
|
|
||||||
// if the message was already marked as deleted, remove it from the db instead
|
// if the message was already marked as deleted or control messages, remove it from the db instead
|
||||||
if(messages.all { it.isDeleted }){
|
if(messages.all { it.isDeleted || it.isControlMessage }){
|
||||||
// Remove the message locally (leave nothing behind)
|
// Remove the message locally (leave nothing behind)
|
||||||
repository.deleteMessages(messages = messages, threadId = threadId)
|
repository.deleteMessages(messages = messages, threadId = threadId)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user