mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-28 10:47:46 +00:00
don't show delete options for old messages
This commit is contained in:
parent
ecc881bc7c
commit
d9eb2c7585
@ -1223,6 +1223,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
||||
return
|
||||
}
|
||||
val allSentByCurrentUser = messages.all { it.isOutgoing }
|
||||
val allHasHash = messages.all { DatabaseFactory.getLokiMessageDatabase(this@ConversationActivityV2).getMessageServerHash(it.id) != null }
|
||||
if (thread.isOpenGroupRecipient) {
|
||||
val messageCount = messages.size
|
||||
val builder = AlertDialog.Builder(this)
|
||||
@ -1240,7 +1241,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
||||
endActionMode()
|
||||
}
|
||||
builder.show()
|
||||
} else if (allSentByCurrentUser) {
|
||||
} else if (allSentByCurrentUser && allHasHash) {
|
||||
val bottomSheet = DeleteOptionsBottomSheet()
|
||||
bottomSheet.recipient = thread
|
||||
bottomSheet.onDeleteForMeTapped = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user