Remove off option from one-to-one conversation expiration settings

This commit is contained in:
charles 2022-11-29 14:20:45 +11:00
parent 820354d451
commit cc8fdb58dd

View File

@ -66,8 +66,12 @@ class ExpirationSettingsViewModel(
ExpirationType.DELETE_AFTER_READ -> afterReadOptions
else -> emptyList()
}
}.onEach {
_expirationTimerOptions.value = it
}.onEach { options ->
_expirationTimerOptions.value = if (recipient.value?.isLocalNumber == true || recipient.value?.isClosedGroupRecipient == true) {
options
} else {
options.slice(1 until options.size)
}
}.launchIn(viewModelScope)
}