From d43d2b6dd9fcbd2c32b40abd4cad10fbb615ae84 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Fri, 17 May 2024 15:39:34 +0800 Subject: [PATCH] fix: quoteForward after noQuoteForward --- .../org/telegram/messenger/MessagePreviewParams.java | 4 ++++ .../src/main/java/org/telegram/ui/ChatActivity.java | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessagePreviewParams.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessagePreviewParams.java index fb149152a7..1a47195aab 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessagePreviewParams.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessagePreviewParams.java @@ -547,6 +547,10 @@ public void attach(MessagePreviewView previewView) { this.previewView = previewView; } + public void setHideForwardSendersName(boolean hideForwardSendersName) { + this.hideForwardSendersName = hideForwardSendersName; + } + public void checkEdits(ArrayList replaceMessageObjects) { boolean replaced = false; if (forwardMessages != null) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index c6abba7075..6d3ecedaff 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -30639,6 +30639,9 @@ private void processSelectedOption(int option) { } case OPTION_FORWARD: { noForwardQuote = false; //fuck + if (messagePreviewParams != null) { + messagePreviewParams.setHideForwardSendersName(noForwardQuote); + } forwardingMessage = selectedObject; forwardingMessageGroup = selectedObjectGroup; Bundle args = new Bundle(); @@ -39040,6 +39043,9 @@ private void nkbtn_onclick_actionbar(int id) { // should hide shit action bar after done if (id == nkbtn_forward_noquote) { noForwardQuote = id == nkbtn_forward_noquote; + if (messagePreviewParams != null) { + messagePreviewParams.setHideForwardSendersName(noForwardQuote); + } openForward(true); } else if (id == nkactionbarbtn_reply) { MessageObject messageObject = null; @@ -39265,6 +39271,9 @@ private void nkbtn_onclick(int id) { } case nkbtn_forward_noquote: { noForwardQuote = true; + if (messagePreviewParams != null) { + messagePreviewParams.setHideForwardSendersName(noForwardQuote); + } forwardingMessage = selectedObject; forwardingMessageGroup = selectedObjectGroup; Bundle args = new Bundle();