Adjusted comment

This commit is contained in:
alansley 2024-08-28 14:31:52 +10:00
parent dfebe6f3f9
commit 8d97f31b4d

View File

@ -310,7 +310,7 @@ class EditClosedGroupActivity : PassphraseRequiredActionBarActivity() {
val userPublicKey = TextSecurePreferences.getLocalNumber(this)!! val userPublicKey = TextSecurePreferences.getLocalNumber(this)!!
val userAsRecipient = Recipient.from(this, Address.fromSerialized(userPublicKey), false) val userAsRecipient = Recipient.from(this, Address.fromSerialized(userPublicKey), false)
// There's presently way in the UI to get into the state whereby you could remove yourself from the group when removing any other members // There's presently no way in the UI to get into the state whereby you could remove yourself from the group when removing any other members
// (you can't unselect yourself - the only way to leave is to "Leave Group" from the menu) - but it's possible that this was not always // (you can't unselect yourself - the only way to leave is to "Leave Group" from the menu) - but it's possible that this was not always
// the case - so we can leave this in as defensive code in-case something goes screwy. // the case - so we can leave this in as defensive code in-case something goes screwy.
if (!members.contains(userAsRecipient) && !members.map { it.address.toString() }.containsAll(originalMembers.minus(userPublicKey))) { if (!members.contains(userAsRecipient) && !members.map { it.address.toString() }.containsAll(originalMembers.minus(userPublicKey))) {