fix: Small channel fixes (#3807)

* fix: Small channel fixes

- In the profile view of an InBroadcast, the subtitle said "Contact".
  I just removed the subtitle, because it already says "Channel" at the
  top.
- When tapping on the avatar of an InBroadcast, an "Edit" button was shown

* fix: Also disable edit button for mailinglists
This commit is contained in:
Hocuri
2025-07-10 19:30:52 +02:00
committed by GitHub
parent fcf98ab7e9
commit 90cf75421b
2 changed files with 4 additions and 3 deletions
@@ -334,7 +334,10 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity
Intent intent = new Intent(this, MediaPreviewActivity.class);
intent.setDataAndType(profileImageUri, type);
intent.putExtra(MediaPreviewActivity.ACTIVITY_TITLE_EXTRA, title);
intent.putExtra(MediaPreviewActivity.EDIT_AVATAR_CHAT_ID, chatIsMultiUser ? chatId : 0); // shows edit-button, might be 0 for a contact-profile
intent.putExtra( // show edit-button, if the user is allowed to edit the name/avatar
MediaPreviewActivity.EDIT_AVATAR_CHAT_ID,
(chatIsMultiUser && !chatIsInBroadcast && !chatIsMailingList) ? chatId : 0
);
startActivity(intent);
} else if (chatIsMultiUser){
onEditName();
@@ -61,8 +61,6 @@ public class ProfileAvatarItem extends LinearLayout implements RecipientModified
subtitle = dcChat.getMailinglistAddr();
} else if (dcChat.isOutBroadcast()) {
subtitle = getContext().getResources().getQuantityString(R.plurals.n_recipients, memberCount, memberCount);
} else if (dcChat.isInBroadcast()) {
subtitle = getContext().getString(R.string.contact);
} else if (dcChat.getType() == DcChat.DC_CHAT_TYPE_GROUP) {
subtitle = getContext().getResources().getQuantityString(R.plurals.n_members, memberCount, memberCount);
}