make minimum group members count 1 rather than 2

This commit is contained in:
Audric Ackermann 2020-08-26 11:49:19 +10:00
parent 6162a8d679
commit 8184fccb8e
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4
3 changed files with 5 additions and 5 deletions

View File

@ -1747,7 +1747,7 @@
<string name="activity_create_closed_group_empty_state_button_title">Start a Session</string>
<string name="activity_create_closed_group_group_name_missing_error">Please enter a group name</string>
<string name="activity_create_closed_group_group_name_too_long_error">Please enter a shorter group name</string>
<string name="activity_create_closed_group_not_enough_group_members_error">Please pick at least 2 group members</string>
<string name="activity_create_closed_group_not_enough_group_members_error">Please pick at least 1 group member</string>
<string name="activity_create_closed_group_too_many_group_members_error">A closed group cannot have more than 10 members</string>
<string name="activity_create_closed_group_invalid_session_id_error">One of the members of your group has an invalid Session ID</string>
@ -1841,7 +1841,7 @@
<string name="activity_edit_closed_group_add_members">Add members</string>
<string name="activity_edit_closed_group_group_name_missing_error">Group name can\'t be empty</string>
<string name="activity_edit_closed_group_group_name_too_long_error">Please enter a shorter group name</string>
<string name="activity_edit_closed_group_not_enough_group_members_error">Groups must have at least 2 group members</string>
<string name="activity_edit_closed_group_not_enough_group_members_error">Groups must have at least 1 group member</string>
<string name="activity_edit_closed_group_too_many_group_members_error">A closed group cannot have more than 10 members</string>
<string name="activity_edit_closed_group_invalid_session_id_error">One of the members of your group has an invalid Session ID</string>
<string name="activity_edit_closed_group_confirm_removal">Are you sure you want to remove this user?</string>

View File

@ -115,7 +115,7 @@ class CreateClosedGroupActivity : PassphraseRequiredActionBarActivity(), LoaderM
return Toast.makeText(this, R.string.activity_create_closed_group_group_name_too_long_error, Toast.LENGTH_LONG).show()
}
val selectedMembers = this.selectContactsAdapter.selectedMembers
if (selectedMembers.count() < 2) {
if (selectedMembers.count() < 1) {
return Toast.makeText(this, R.string.activity_create_closed_group_not_enough_group_members_error, Toast.LENGTH_LONG).show()
}
if (selectedMembers.count() > ClosedGroupsProtocol.groupSizeLimit) { // Minus one because we're going to include self later
@ -136,7 +136,7 @@ class CreateClosedGroupActivity : PassphraseRequiredActionBarActivity(), LoaderM
return Toast.makeText(this, R.string.activity_create_closed_group_group_name_too_long_error, Toast.LENGTH_LONG).show()
}
val selectedMembers = this.selectContactsAdapter.selectedMembers
if (selectedMembers.count() < 2) {
if (selectedMembers.count() < 1) {
return Toast.makeText(this, R.string.activity_create_closed_group_not_enough_group_members_error, Toast.LENGTH_LONG).show()
}
if (selectedMembers.count() > 10) {

View File

@ -222,7 +222,7 @@ class EditClosedGroupActivity : PassphraseRequiredActionBarActivity() {
isSSKBasedClosedGroup = false
}
if (members.size < 2) {
if (members.size < 1) {
return Toast.makeText(this, R.string.activity_edit_closed_group_not_enough_group_members_error, Toast.LENGTH_LONG).show()
}