Skip to content

Commit

Permalink
fix: chat rights edit count
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed May 4, 2024
1 parent e3bf8d3 commit 113836c
Showing 1 changed file with 11 additions and 2 deletions.
Expand Up @@ -578,9 +578,9 @@ public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
sendMediaExpanded = !sendMediaExpanded;
updateRows(false);
if (sendMediaExpanded) {
listViewAdapter.notifyItemRangeInserted(sendMediaRow + 1, 9);
listViewAdapter.notifyItemRangeInserted(sendMediaRow + 1, 12);
} else {
listViewAdapter.notifyItemRangeRemoved(sendMediaRow + 1, 9);
listViewAdapter.notifyItemRangeRemoved(sendMediaRow + 1, 12);
}
return;
} else if (position == channelMessagesRow) {
Expand Down Expand Up @@ -2150,6 +2150,15 @@ private int getSendMediaSelectedCount() {
if (!bannedRights.send_polls && !defaultBannedRights.send_polls) {
i++;
}
if (!bannedRights.send_gifs && !defaultBannedRights.send_gifs) {
i++;
}
if (!bannedRights.send_games && !defaultBannedRights.send_games) {
i++;
}
if (!bannedRights.send_inline && !defaultBannedRights.send_inline) {
i++;
}
return i;
}

Expand Down

0 comments on commit 113836c

Please sign in to comment.