diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java index d2b080061..6c96d58be 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java @@ -5728,7 +5728,10 @@ public boolean isChatNoForwards(TLRPC.Chat chat) { } public boolean isChatNoForwards(long chatId) { + /* return isChatNoForwards(getChat(chatId)); + */ + return false; } public TLRPC.User getUser(Long id) { diff --git a/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java b/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java index 7fac04eac..2f2e828f8 100644 --- a/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java +++ b/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java @@ -47813,7 +47813,7 @@ public static abstract class Chat extends TLObject { public boolean call_not_empty; public boolean fake; public boolean gigagroup; - public boolean noforwards; + public boolean noforwards = false; public boolean forum; public ArrayList restriction_reason = new ArrayList<>(); public TL_channelAdminRights_layer92 admin_rights_layer92; @@ -48050,7 +48050,7 @@ public void readParams(AbstractSerializedData stream, boolean exception, boolean deactivated = (flags & 32) != 0; call_active = (flags & 8388608) != 0; call_not_empty = (flags & 16777216) != 0; - noforwards = (flags & 33554432) != 0; + /* noforwards = (flags & 33554432) != 0; */ id = stream.readInt64(exception); title = stream.readString(exception); photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception, allowStrippedThumb); @@ -48330,7 +48330,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { call_not_empty = (flags & 16777216) != 0; fake = (flags & 33554432) != 0; gigagroup = (flags & 67108864) != 0; - noforwards = (flags & 134217728) != 0; + /* noforwards = (flags & 134217728) != 0; */ join_to_send = (flags & 268435456) != 0; join_request = (flags & 536870912) != 0; forum = (flags & 1073741824) != 0; @@ -48503,7 +48503,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { call_not_empty = (flags & 16777216) != 0; fake = (flags & 33554432) != 0; gigagroup = (flags & 67108864) != 0; - noforwards = (flags & 134217728) != 0; + /* noforwards = (flags & 134217728) != 0; */ join_to_send = (flags & 268435456) != 0; join_request = (flags & 536870912) != 0; forum = (flags & 1073741824) != 0; @@ -48682,7 +48682,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { call_not_empty = (flags & 16777216) != 0; fake = (flags & 33554432) != 0; gigagroup = (flags & 67108864) != 0; - noforwards = (flags & 134217728) != 0; + /* noforwards = (flags & 134217728) != 0; */ join_to_send = (flags & 268435456) != 0; join_request = (flags & 536870912) != 0; forum = (flags & 1073741824) != 0; @@ -48867,7 +48867,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { call_not_empty = (flags & 16777216) != 0; fake = (flags & 33554432) != 0; gigagroup = (flags & 67108864) != 0; - noforwards = (flags & 134217728) != 0; + /* noforwards = (flags & 134217728) != 0; */ join_to_send = (flags & 268435456) != 0; join_request = (flags & 536870912) != 0; forum = (flags & 1073741824) != 0; @@ -49034,7 +49034,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { call_not_empty = (flags & 16777216) != 0; fake = (flags & 33554432) != 0; gigagroup = (flags & 67108864) != 0; - noforwards = (flags & 134217728) != 0; + /* noforwards = (flags & 134217728) != 0; */ join_to_send = (flags & 268435456) != 0; join_request = (flags & 536870912) != 0; forum = (flags & 1073741824) != 0; @@ -49211,7 +49211,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { call_not_empty = (flags & 16777216) != 0; fake = (flags & 33554432) != 0; gigagroup = (flags & 67108864) != 0; - noforwards = (flags & 134217728) != 0; + /* noforwards = (flags & 134217728) != 0; */ join_to_send = (flags & 268435456) != 0; join_request = (flags & 536870912) != 0; forum = (flags & 1073741824) != 0; @@ -49385,7 +49385,7 @@ public void readParams(AbstractSerializedData stream, boolean exception, boolean call_not_empty = (flags & 16777216) != 0; fake = (flags & 33554432) != 0; gigagroup = (flags & 67108864) != 0; - noforwards = (flags & 134217728) != 0; + /* noforwards = (flags & 134217728) != 0; */ join_to_send = (flags & 268435456) != 0; join_request = (flags & 536870912) != 0; forum = (flags & 1073741824) != 0; @@ -49539,7 +49539,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { call_not_empty = (flags & 16777216) != 0; fake = (flags & 33554432) != 0; gigagroup = (flags & 67108864) != 0; - noforwards = (flags & 134217728) != 0; + /* noforwards = (flags & 134217728) != 0; */ join_to_send = (flags & 268435456) != 0; join_request = (flags & 536870912) != 0; forum = (flags & 1073741824) != 0; @@ -68512,7 +68512,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { legacy = (flags & 524288) != 0; edit_hide = (flags & 2097152) != 0; pinned = (flags & 16777216) != 0; - noforwards = (flags & 67108864) != 0; + /* noforwards = (flags & 67108864) != 0; */ invert_media = (flags & 134217728) != 0; flags2 = stream.readInt32(exception); offline = (flags2 & 2) != 0; @@ -68736,7 +68736,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { legacy = (flags & 524288) != 0; edit_hide = (flags & 2097152) != 0; pinned = (flags & 16777216) != 0; - noforwards = (flags & 67108864) != 0; + /* noforwards = (flags & 67108864) != 0; */ invert_media = (flags & 134217728) != 0; flags2 = stream.readInt32(exception); offline = (flags2 & 2) != 0; @@ -68954,7 +68954,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { legacy = (flags & 524288) != 0; edit_hide = (flags & 2097152) != 0; pinned = (flags & 16777216) != 0; - noforwards = (flags & 67108864) != 0; + /* noforwards = (flags & 67108864) != 0; */ invert_media = (flags & 134217728) != 0; flags2 = stream.readInt32(exception); offline = (flags2 & 2) != 0; @@ -69166,7 +69166,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { legacy = (flags & 524288) != 0; edit_hide = (flags & 2097152) != 0; pinned = (flags & 16777216) != 0; - noforwards = (flags & 67108864) != 0; + /* noforwards = (flags & 67108864) != 0; */ invert_media = (flags & 134217728) != 0; id = stream.readInt32(exception); if ((flags & 256) != 0) { @@ -69368,7 +69368,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { legacy = (flags & 524288) != 0; edit_hide = (flags & 2097152) != 0; pinned = (flags & 16777216) != 0; - noforwards = (flags & 67108864) != 0; + /* noforwards = (flags & 67108864) != 0; */ invert_media = (flags & 134217728) != 0; id = stream.readInt32(exception); if ((flags & 256) != 0) { @@ -69564,7 +69564,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { legacy = (flags & 524288) != 0; edit_hide = (flags & 2097152) != 0; pinned = (flags & 16777216) != 0; - noforwards = (flags & 67108864) != 0; + /* noforwards = (flags & 67108864) != 0; */ invert_media = (flags & 134217728) != 0; id = stream.readInt32(exception); if ((flags & 256) != 0) { @@ -69754,7 +69754,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { legacy = (flags & 524288) != 0; edit_hide = (flags & 2097152) != 0; pinned = (flags & 16777216) != 0; - noforwards = (flags & 67108864) != 0; + /* noforwards = (flags & 67108864) != 0; */ invert_media = (flags & 134217728) != 0; id = stream.readInt32(exception); if ((flags & 256) != 0) { @@ -69939,7 +69939,7 @@ public void readParams(AbstractSerializedData stream, boolean exception) { legacy = (flags & 524288) != 0; edit_hide = (flags & 2097152) != 0; pinned = (flags & 16777216) != 0; - noforwards = (flags & 67108864) != 0; + /* noforwards = (flags & 67108864) != 0; */ id = stream.readInt32(exception); if ((flags & 256) != 0) { from_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index bddaa4d4d..b5f439e08 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -3134,6 +3134,7 @@ protected boolean canShowQuote() { ); } + /* @Override protected boolean canCopy() { return chatActivity == null || !( @@ -3141,7 +3142,7 @@ protected boolean canCopy() { selectedView != null && selectedView.getMessageObject() != null && (selectedView.getMessageObject().messageOwner != null && selectedView.getMessageObject().messageOwner.noforwards) ); } - + */ @Override protected void onQuoteClick(MessageObject messageObject, int start, int end, CharSequence text) { if (messageObject == null) { @@ -9319,7 +9320,7 @@ private void createActionMode() { actionModeViews.add(actionMode.addItemWithWidth(delete, R.drawable.msg_delete, AndroidUtilities.dp(54), LocaleController.getString(R.string.Delete))); } actionMode.setItemVisibility(edit, canEditMessagesCount == 1 && selectedMessagesIds[0].size() + selectedMessagesIds[1].size() == 1 ? View.VISIBLE : View.GONE); - actionMode.setItemVisibility(copy, !getMessagesController().isChatNoForwards(currentChat) && selectedMessagesCanCopyIds[0].size() + selectedMessagesCanCopyIds[1].size() != 0 ? View.VISIBLE : View.GONE); + actionMode.setItemVisibility(copy, /* !getMessagesController().isChatNoForwards(currentChat) && selectedMessagesCanCopyIds[0].size() + selectedMessagesCanCopyIds[1].size() != 0 ? View.VISIBLE : View.GONE */ View.VISIBLE); actionMode.setItemVisibility(star, selectedMessagesCanStarIds[0].size() + selectedMessagesCanStarIds[1].size() != 0 ? View.VISIBLE : View.GONE); actionMode.setItemVisibility(delete, cantDeleteMessagesCount == 0 ? View.VISIBLE : View.GONE); actionMode.setItemVisibility(tag_message, getUserConfig().isPremium() ? View.VISIBLE : View.GONE); @@ -32617,7 +32618,7 @@ private void openClickableLink(CharacterStyle url, String str, boolean longPress builder.setTitleMultipleLines(true); } final int finalTimestamp = timestamp; - boolean noforwards = getMessagesController().isChatNoForwards(currentChat) || (messageObject != null && messageObject.messageOwner != null && messageObject.messageOwner.noforwards); + boolean noforwards = false; /* getMessagesController().isChatNoForwards(currentChat) || (messageObject != null && messageObject.messageOwner != null && messageObject.messageOwner.noforwards); */ builder.setItems(noforwards ? new CharSequence[] {LocaleController.getString("Open", R.string.Open)} : new CharSequence[]{LocaleController.getString("Open", R.string.Open), LocaleController.getString("Copy", R.string.Copy)}, (dialog, which) -> { if (which == 0) { if (str.startsWith("video?")) {