From a40e3af3e5cbf517f76abdbc38ab19d3bccff0e3 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Fri, 31 Mar 2023 21:54:45 +0200 Subject: [PATCH] Fixed bug where public rooms weren't filtered correctly This was caused by doNetworkRequest introduced in Commit 5d333522a5 (Simplified network requests & snackbars, 2023-03-23), as it ran asynchronously and thus the blacklist wasn't filled in time. --- lib/screens/room/join.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/screens/room/join.dart b/lib/screens/room/join.dart index 8ccf5c1..73d994b 100644 --- a/lib/screens/room/join.dart +++ b/lib/screens/room/join.dart @@ -36,7 +36,7 @@ class _JoinRoomPageState extends State { // try to fetch a list of rooms the user is a member of // use an empty blacklist when request is not successful final List blacklist = []; - doNetworkRequest(sm, + await doNetworkRequest(sm, req: () => postWithCreadentials( path: 'listRooms', credentials: user, @@ -62,7 +62,7 @@ class _JoinRoomPageState extends State { // only add room to list, // if not on blacklist for (Room r in blacklist) { - if (r.compareTo(room) == 0) { + if (r == room) { // server on white list // move to next iteration on outer for loop continue processor;