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.
This commit is contained in:
parent
99f0ed3558
commit
a40e3af3e5
1 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ class _JoinRoomPageState extends State {
|
||||||
// try to fetch a list of rooms the user is a member of
|
// try to fetch a list of rooms the user is a member of
|
||||||
// use an empty blacklist when request is not successful
|
// use an empty blacklist when request is not successful
|
||||||
final List<Room> blacklist = [];
|
final List<Room> blacklist = [];
|
||||||
doNetworkRequest(sm,
|
await doNetworkRequest(sm,
|
||||||
req: () => postWithCreadentials(
|
req: () => postWithCreadentials(
|
||||||
path: 'listRooms',
|
path: 'listRooms',
|
||||||
credentials: user,
|
credentials: user,
|
||||||
|
@ -62,7 +62,7 @@ class _JoinRoomPageState extends State {
|
||||||
// only add room to list,
|
// only add room to list,
|
||||||
// if not on blacklist
|
// if not on blacklist
|
||||||
for (Room r in blacklist) {
|
for (Room r in blacklist) {
|
||||||
if (r.compareTo(room) == 0) {
|
if (r == room) {
|
||||||
// server on white list
|
// server on white list
|
||||||
// move to next iteration on outer for loop
|
// move to next iteration on outer for loop
|
||||||
continue processor;
|
continue processor;
|
||||||
|
|
Loading…
Reference in a new issue