From 8ffb3db8c99605968f150ab4b724e7b7081e48b0 Mon Sep 17 00:00:00 2001 From: Sorunome Date: Wed, 20 Jan 2021 16:51:29 +0100 Subject: [PATCH] fix: Make tapping on pills join if remote directory is private --- lib/views/discover_view.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/views/discover_view.dart b/lib/views/discover_view.dart index 65444ade..b0b30dcb 100644 --- a/lib/views/discover_view.dart +++ b/lib/views/discover_view.dart @@ -122,7 +122,14 @@ class _DiscoverPageState extends State { server: server, genericSearchTerm: _genericSearchTerm, ) - .then((PublicRoomsResponse res) { + .catchError((error) { + if (widget.alias == null) { + throw error; + } + return PublicRoomsResponse.fromJson({ + 'chunk': [], + }); + }).then((PublicRoomsResponse res) { if (widget.alias != null && !res.chunk.any((room) => room.aliases.contains(widget.alias) ||