feat: ChatRightsEditActivity Open User

This commit is contained in:
xtaodada 2023-06-23 15:01:51 +08:00
parent 0d6e27edfa
commit 231f0cab5d
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -538,6 +538,11 @@ public class ChatRightsEditActivity extends BaseFragment {
});
listView.setOnItemClickListener((view, position) -> {
if (((currentType == TYPE_ADMIN && currentUser != null) || canEdit) && position == 0) {
Bundle args = new Bundle();
args.putLong("user_id", currentUser.id);
presentFragment(new ProfileActivity(args));
}
if (!canEdit && (!currentChat.creator || currentType != TYPE_ADMIN || position != anonymousRow)) {
return;
}
@ -560,11 +565,12 @@ public class ChatRightsEditActivity extends BaseFragment {
}
return;
}
if (position == 0) {
Bundle args = new Bundle();
args.putLong("user_id", currentUser.id);
presentFragment(new ProfileActivity(args));
} else if (position == removeAdminRow) {
// if (position == 0) {
// Bundle args = new Bundle();
// args.putLong("user_id", currentUser.id);
// presentFragment(new ProfileActivity(args));
// } else
if (position == removeAdminRow) {
if (currentType == TYPE_ADMIN) {
MessagesController.getInstance(currentAccount).setUserAdminRole(chatId, currentUser, new TLRPC.TL_chatAdminRights(), currentRank, isChannel, getFragmentForAlert(0), isAddingNew, false, null, null);
if (delegate != null) {