Update group admin check

This commit is contained in:
charles 2022-12-23 11:58:49 +11:00
parent b1f69539a9
commit 0f4e18fe93

View File

@ -63,7 +63,7 @@ class ExpirationSettingsViewModel(
} else null } else null
_uiState.update { currentUiState -> _uiState.update { currentUiState ->
currentUiState.copy( currentUiState.copy(
isSelfAdmin = groupInfo?.admins?.any{ it.serialize() == textSecurePreferences.getLocalNumber() } == true, isSelfAdmin = groupInfo == null || groupInfo.admins.any{ it.serialize() == textSecurePreferences.getLocalNumber() },
showExpirationTypeSelector = !ExpirationConfiguration.isNewConfigEnabled || (recipient?.isContactRecipient == true && !recipient.isLocalNumber) showExpirationTypeSelector = !ExpirationConfiguration.isNewConfigEnabled || (recipient?.isContactRecipient == true && !recipient.isLocalNumber)
) )
} }