diff --git a/app/src/main/java/com/keylesspalace/tusky/components/account/AccountViewModel.kt b/app/src/main/java/com/keylesspalace/tusky/components/account/AccountViewModel.kt index af665e7c..5b32e340 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/account/AccountViewModel.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/account/AccountViewModel.kt @@ -85,7 +85,7 @@ class AccountViewModel @Inject constructor( mastodonApi.relationships(listOf(accountId)) .fold( { relationships -> - relationshipData.postValue(Success(relationships[0])) + relationshipData.postValue(if (relationships.isNotEmpty()) Success(relationships[0]) else Error()) }, { t -> Log.w(TAG, "failed obtaining relationships", t)