minor fix

This commit is contained in:
ryanzhao 2021-08-13 15:49:05 +10:00
parent aad58043d3
commit cb59a1af2d

View File

@ -1155,7 +1155,10 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
}
}
} else {
messageDataProvider.getServerHashForMessage(message.id)?.let { serverHash ->
val serverHash = messageDataProvider.getServerHashForMessage(message.id)
if (serverHash == null) {
messageDataProvider.deleteMessage(message.id, !message.isMms)
} else {
SnodeAPI.deleteMessage(thread.address.serialize(), listOf(serverHash))
.success {
messageDataProvider.deleteMessage(message.id, !message.isMms)
@ -1192,14 +1195,19 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
this.deleteLocally(message)
}
bottomSheet.dismiss()
endActionMode()
}
bottomSheet.onDeleteForEveryoneTapped = {
for (message in messages) {
this.deleteForEveryone(message)
}
bottomSheet.dismiss()
endActionMode()
}
bottomSheet.onCancelTapped = {
bottomSheet.dismiss()
endActionMode()
}
bottomSheet.onCancelTapped = { bottomSheet.dismiss() }
bottomSheet.show(supportFragmentManager, bottomSheet.tag)
}
}