Making sure an empty relay list uses the default list from Amethyst
This commit is contained in:
@@ -2761,7 +2761,10 @@ class Account(
|
||||
// Takes a User's relay list and adds the types of feeds they are active for.
|
||||
fun activeRelays(): Array<RelaySetupInfo>? {
|
||||
val usersRelayList =
|
||||
userProfile().latestContactList?.relays()?.map {
|
||||
userProfile()
|
||||
.latestContactList
|
||||
?.relays()
|
||||
?.map {
|
||||
val url = RelayUrlFormatter.normalize(it.key)
|
||||
|
||||
val localFeedTypes =
|
||||
@@ -2773,7 +2776,7 @@ class Account(
|
||||
?: Constants.activeTypesGlobalChats
|
||||
|
||||
RelaySetupInfo(url, it.value.read, it.value.write, localFeedTypes)
|
||||
} ?: return null
|
||||
}?.ifEmpty { null } ?: return null
|
||||
|
||||
return usersRelayList.toTypedArray()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user