Skip to content

Commit

Permalink
Merge branch 'NextAlone:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
LiuYi0526 authored Feb 8, 2024
2 parents 7408ed7 + 93394e3 commit e4bff94
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4919,8 +4919,13 @@ protected void onLongPress() {
writeButton.setContentDescription(LocaleController.getString("AccDescrOpenChat", R.string.AccDescrOpenChat));
}
} else {
writeButton.setImageResource(R.drawable.profile_discuss);
writeButton.setContentDescription(LocaleController.getString("ViewDiscussion", R.string.ViewDiscussion));
if (currentChat.megagroup) {
writeButton.setImageResource(R.drawable.msg_channel);
writeButton.setContentDescription(LocaleController.getString("OpenChannel2", R.string.OpenChannel2));
} else {
writeButton.setImageResource(R.drawable.profile_discuss);
writeButton.setContentDescription(LocaleController.getString("ViewDiscussion", R.string.ViewDiscussion));
}
}
writeButton.setColorFilter(new PorterDuffColorFilter(getThemedColor(Theme.key_profile_actionIcon), PorterDuff.Mode.SRC_IN));
writeButton.setScaleType(ImageView.ScaleType.CENTER);
Expand Down Expand Up @@ -6844,7 +6849,8 @@ private void needLayout(boolean animated) {

boolean writeButtonVisible = diff > 0.2f && !searchMode && (imageUpdater == null || setAvatarRow == -1);
if (writeButtonVisible && chatId != 0) {
writeButtonVisible = ChatObject.isChannel(currentChat) && !currentChat.megagroup && chatInfo != null && chatInfo.linked_chat_id != 0 && infoHeaderRow != -1;
// na: show write Button for currentChat.megagroup
writeButtonVisible = ChatObject.isChannel(currentChat) && chatInfo != null && chatInfo.linked_chat_id != 0 && infoHeaderRow != -1;
}
if (!openAnimationInProgress) {
boolean currentVisible = writeButton.getTag() == null;
Expand Down

0 comments on commit e4bff94

Please sign in to comment.