change: Remove unnecessary null check
This commit is contained in:
parent
d87a6718cc
commit
b0fccb0aa7
|
@ -87,7 +87,7 @@ class PreviewCardView @JvmOverloads constructor(
|
|||
|
||||
when {
|
||||
card.description.isNotBlank() -> card.description
|
||||
card.authorName.orEmpty().isNotBlank() -> card.authorName
|
||||
card.authorName.isNotBlank() -> card.authorName
|
||||
else -> null
|
||||
}?.let { cardDescription.text = it } ?: cardDescription.hide()
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class LoginWebViewViewModel @Inject constructor(
|
|||
this.domain = domain
|
||||
viewModelScope.launch {
|
||||
api.getInstanceV1(domain).fold({ instance ->
|
||||
instanceRules.value = instance.rules?.map { rule -> rule.text }.orEmpty()
|
||||
instanceRules.value = instance.rules.map { rule -> rule.text }
|
||||
}, { throwable ->
|
||||
Timber.w(throwable, "failed to load instance info")
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue