Check whether recipient is blockable before allowing blocking.

fork-5.53.8
Alex Hart 2021-11-29 11:21:40 -04:00
rodzic 31a815013e
commit 0edfb0bd68
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -138,7 +138,7 @@ sealed class ConversationSettingsViewModel(
isSearchAvailable = true isSearchAvailable = true
), ),
disappearingMessagesLifespan = recipient.expiresInSeconds, disappearingMessagesLifespan = recipient.expiresInSeconds,
canModifyBlockedState = !recipient.isSelf, canModifyBlockedState = !recipient.isSelf && RecipientUtil.isBlockable(recipient),
specificSettingsState = state.requireRecipientSettingsState().copy( specificSettingsState = state.requireRecipientSettingsState().copy(
contactLinkState = when { contactLinkState = when {
recipient.isSelf -> ContactLinkState.NONE recipient.isSelf -> ContactLinkState.NONE