diff --git a/app/src/main/java/org/thoughtcrime/securesms/contacts/ContactChipViewModel.kt b/app/src/main/java/org/thoughtcrime/securesms/contacts/ContactChipViewModel.kt index 283bd823d2..74f5934be5 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/contacts/ContactChipViewModel.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/contacts/ContactChipViewModel.kt @@ -25,7 +25,8 @@ class ContactChipViewModel : ViewModel() { .distinctUntilChanged() .observeOn(AndroidSchedulers.mainThread()) - val count = store.state.size + val count: Int + get() = store.state.size private val disposables = CompositeDisposable() private val disposableMap: MutableMap = mutableMapOf() diff --git a/app/src/main/java/org/thoughtcrime/securesms/groups/ui/GroupLimitDialog.java b/app/src/main/java/org/thoughtcrime/securesms/groups/ui/GroupLimitDialog.java index c5c7790c5b..d40223ff5b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/groups/ui/GroupLimitDialog.java +++ b/app/src/main/java/org/thoughtcrime/securesms/groups/ui/GroupLimitDialog.java @@ -9,21 +9,25 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder; import org.thoughtcrime.securesms.R; import org.thoughtcrime.securesms.util.RemoteConfig; +import java.text.NumberFormat; + public final class GroupLimitDialog { public static void showHardLimitMessage(@NonNull Context context) { + String formattedLimit = NumberFormat.getInstance().format(RemoteConfig.groupLimits().getHardLimit()); new MaterialAlertDialogBuilder(context) - .setTitle(R.string.ContactSelectionListFragment_maximum_group_size_reached) - .setMessage(context.getString(R.string.ContactSelectionListFragment_signal_groups_can_have_a_maximum_of_d_members, RemoteConfig.groupLimits().getHardLimit())) - .setPositiveButton(android.R.string.ok, null) - .show(); + .setTitle(R.string.ContactSelectionListFragment_maximum_group_size_reached) + .setMessage(context.getString(R.string.ContactSelectionListFragment_signal_groups_can_have_a_maximum_of_s_members, formattedLimit)) + .setPositiveButton(android.R.string.ok, null) + .show(); } public static void showRecommendedLimitMessage(@NonNull Context context) { + String formattedLimit = NumberFormat.getInstance().format(RemoteConfig.groupLimits().getRecommendedLimit()); new MaterialAlertDialogBuilder(context) - .setTitle(R.string.ContactSelectionListFragment_recommended_member_limit_reached) - .setMessage(context.getString(R.string.ContactSelectionListFragment_signal_groups_perform_best_with_d_members_or_fewer, RemoteConfig.groupLimits().getRecommendedLimit())) - .setPositiveButton(android.R.string.ok, null) - .show(); + .setTitle(R.string.ContactSelectionListFragment_recommended_member_limit_reached) + .setMessage(context.getString(R.string.ContactSelectionListFragment_signal_groups_perform_best_with_s_members_or_fewer, formattedLimit)) + .setPositiveButton(android.R.string.ok, null) + .show(); } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0cbf4b94df..0c53462bef 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,4 +1,5 @@ + - You revoked an invitation to the group. - You revoked %1$d invitations to the group. + You revoked an invitation to the group. + You revoked %1$d invitations to the group. - %1$s revoked an invitation to the group. - %1$s revoked %2$d invitations to the group. + %1$s revoked an invitation to the group. + %1$s revoked %2$d invitations to the group. Someone declined an invitation to the group. You declined the invitation to the group. %1$s revoked your invitation to the group. An admin revoked your invitation to the group. - An invitation to the group was revoked. - %1$d invitations to the group were revoked. + An invitation to the group was revoked. + %1$d invitations to the group were revoked. @@ -3435,9 +3436,9 @@ "%1$s" is not a Signal user. Please check the username and try again. You do not need to add yourself to the group Maximum group size reached - Signal groups can have a maximum of %1$d members. + Signal groups can have a maximum of %1$s members. Recommended member limit reached - Signal groups perform best with %1$d members or fewer. Adding more members will cause delays sending and receiving messages. + Signal groups perform best with %1$s members or fewer. Adding more members will cause delays sending and receiving messages. %1$d member %1$d members @@ -6026,7 +6027,7 @@ Add to the group story \"%s\" - Add to story + Add to story Add a message Add a reply @@ -6120,7 +6121,6 @@ Failed to update profile - Select a badge You must select a badge Failed to update profile