Skip to content

Commit

Permalink
fix: some wrong judgement
Browse files Browse the repository at this point in the history
Signed-off-by: Next Alone <[email protected]>
  • Loading branch information
NextAlone committed Nov 2, 2024
1 parent 33a25d2 commit c19f3f7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5757,7 +5757,7 @@ private void setMessageContent(MessageObject messageObject, MessageObject.Groupe
drawSideButton = checkNeedDrawShareButton(messageObject) ? 2 : 0;
} else if (messageObject.searchType == ChatActivity.SEARCH_MY_MESSAGES) {
drawSideButton = 0;
} else if (!Config.ignoreChatStrict && MessagesController.getInstance(currentAccount).isChatNoForwards(messageObject.getChatId()) || (messageObject.messageOwner != null && messageObject.messageOwner.noforwards)) {
} else if (!Config.ignoreChatStrict && (MessagesController.getInstance(currentAccount).isChatNoForwards(messageObject.getChatId()) || (messageObject.messageOwner != null && messageObject.messageOwner.noforwards))) {
drawSideButton = 0;
} else {
drawSideButton = !isRepliesChat && checkNeedDrawShareButton(messageObject) ? 1 : 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18303,7 +18303,7 @@ private void addToSelectedMessages(MessageObject messageObject, boolean outside,
ActionBarMenuItem shareItem = actionBar.createActionMode().getItem(share);

createBottomMessagesActionButtons();
boolean noforwards = !Config.ignoreChatStrict && getMessagesController().isChatNoForwards(currentChat) || hasSelectedNoforwardsMessage();
boolean noforwards = !Config.ignoreChatStrict && (getMessagesController().isChatNoForwards(currentChat) || hasSelectedNoforwardsMessage());
if (prevCantForwardCount == 0 && cantForwardMessagesCount != 0 || prevCantForwardCount != 0 && cantForwardMessagesCount == 0) {
forwardButtonAnimation = new AnimatorSet();
ArrayList<Animator> animators = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3237,7 +3237,7 @@ private void updateForwardItem() {
if (forwardItem == null) {
return;
}
boolean noforwards = !Config.ignoreChatStrict && profileActivity.getMessagesController().isChatNoForwards(-dialog_id) || hasNoforwardsMessage();
boolean noforwards = !Config.ignoreChatStrict && (profileActivity.getMessagesController().isChatNoForwards(-dialog_id) || hasNoforwardsMessage());
forwardItem.setAlpha(noforwards ? 0.5f : 1f);
if (forwardNoQuoteItem != null) forwardNoQuoteItem.setAlpha(noforwards ? 0.5f : 1f);
if (noforwards && forwardItem.getBackground() != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13208,7 +13208,7 @@ private void setIsAboutToSwitchToIndex(int index, boolean init, boolean animated
actionBarContainer.setSubtitle(subtitle, animated);

boolean isInvoice = newMessageObject.isInvoice();
boolean noforwards = !Config.ignoreChatStrict && MessagesController.getInstance(currentAccount).isChatNoForwards(newMessageObject.getChatId()) || (newMessageObject.messageOwner != null && newMessageObject.messageOwner.noforwards) || newMessageObject.hasRevealedExtendedMedia();
boolean noforwards = !Config.ignoreChatStrict && (MessagesController.getInstance(currentAccount).isChatNoForwards(newMessageObject.getChatId()) || (newMessageObject.messageOwner != null && newMessageObject.messageOwner.noforwards) || newMessageObject.hasRevealedExtendedMedia());
if (isVideo) {
bottomLayout.setVisibility(View.VISIBLE);
bottomLayout.setTag(1);
Expand Down

0 comments on commit c19f3f7

Please sign in to comment.