Skip to content

Commit

Permalink
feat: ChatRightsEditActivity Open User
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Jun 23, 2023
1 parent 490bb70 commit 535d405
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,11 @@ public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
});

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;
}
Expand All @@ -560,11 +565,12 @@ public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
}
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) {
Expand Down

0 comments on commit 535d405

Please sign in to comment.