remoteChatRelationsProvider top-level property
final
Implementation
final remoteChatRelationsProvider =
FutureProvider.family<List<SpaceHierarchyRoomInfo>, String>(
(ref, spaceId) async {
try {
final relatedSpaces =
await ref.watch(spaceRelationsOverviewProvider(spaceId).future);
final toIgnore = relatedSpaces.knownChats.toList();
final roomHierarchy =
await ref.watch(spaceRemoteRelationsProvider(spaceId).future);
// filter out the known rooms
return roomHierarchy
.where((r) => !r.isSpace() && !toIgnore.contains(r.roomIdStr()))
.toList();
} on SpaceNotFound {
return [];
}
});