From 0ddfc51d6c23af91ad52526601a25ec7c2cd5de0 Mon Sep 17 00:00:00 2001 From: Anjan Momi Date: Sun, 5 Jan 2020 02:22:39 -0800 Subject: [PATCH] show number of participants in a MUC fixes #3447 --- .../eu/siacs/conversations/ui/ConferenceDetailsActivity.java | 1 + src/main/res/layout/activity_muc_details.xml | 5 +++-- src/main/res/values/strings.xml | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java index 755a6b045..f3f4ded42 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java @@ -551,6 +551,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers this.mUserPreviewAdapter.submitList(MucOptions.sub(users, GridManager.getCurrentColumnCount(binding.users))); this.binding.invite.setVisibility(mucOptions.canInvite() ? View.VISIBLE : View.GONE); this.binding.showUsers.setVisibility(users.size() > 0 ? View.VISIBLE : View.GONE); + this.binding.showUsers.setText(getResources().getQuantityString(R.plurals.view_users, users.size(), users.size())); this.binding.usersWrapper.setVisibility(users.size() > 0 || mucOptions.canInvite() ? View.VISIBLE : View.GONE); if (users.size() == 0) { this.binding.noUsersHints.setText(mucOptions.isPrivateAndNonAnonymous() ? R.string.no_users_hint_group_chat : R.string.no_users_hint_channel); diff --git a/src/main/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml index 54d7081ab..0d67187e4 100644 --- a/src/main/res/layout/activity_muc_details.xml +++ b/src/main/res/layout/activity_muc_details.xml @@ -1,6 +1,7 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools"> diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 47d0e90ac..fbac96230 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -753,7 +753,6 @@ Importance, Sound, Vibrate Video compression View media - View participants Participants Media browser File omitted due to security violation. @@ -882,5 +881,9 @@ Channel discovery method Backup About + + View %1$d Participant + View %1$d Participants + © OpenStreetMap contributors