mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
don't show "delete for everyone" in unnecrypted chats
This commit is contained in:
@@ -359,7 +359,7 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity
|
||||
finish();
|
||||
});
|
||||
|
||||
if(dcChat.canSend() && !dcChat.isSelfTalk() && dcMsg.isOutgoing()) {
|
||||
if(dcChat.isEncrypted() && dcChat.canSend() && !dcChat.isSelfTalk() && dcMsg.isOutgoing()) {
|
||||
builder.setNegativeButton(R.string.delete_for_everyone, (d, which) -> {
|
||||
Util.runOnAnyBackgroundThread(() -> dcContext.sendDeleteRequest(messageIds));
|
||||
finish();
|
||||
|
||||
@@ -64,7 +64,7 @@ public abstract class MessageSelectorFragment
|
||||
protected void handleDeleteMessages(int chatId, final int[] messageIds) {
|
||||
DcChat dcChat = dcContext.getChat(chatId);
|
||||
boolean canDeleteForAll = true;
|
||||
if (dcChat.canSend() && !dcChat.isSelfTalk()) {
|
||||
if (dcChat.isEncrypted() && dcChat.canSend() && !dcChat.isSelfTalk()) {
|
||||
for(int msgId : messageIds) {
|
||||
DcMsg msg = dcContext.getMsg(msgId);
|
||||
if (!msg.isOutgoing() || msg.isInfo()) {
|
||||
|
||||
Reference in New Issue
Block a user