and rewrote the component's network requests.
showSimpleSnackbar, allows displaying a simple snackbar,
with text and one action button, that can be clicked.
doNetworkRequest is supposed to be a wrapper for the
already existing post* functions.
It aims to make network requests and error handling easier,
by containing all the try&catch blocks
and being able to show snackbars.
This has been done in an effort
to move all endpoints used to join a room
under one umbrella (/add-room)
A list of planned or completed endpoints:
- /add-room
- /add-room/new
- /add-room/by-id
Work already done:
- moving the New Room screen to a different endpoint
- fetching public rooms using the post API
- displaying public rooms
Suggestion for user interaction:
1. click on room
2. open bottomSheet with information and join button
3. click "join" to join room
This is prevents the current route from being reset,
when reloading the tab
and also prevents the welcome screen from showing
(when running on slow connections)
NOTE: This also means that the home screen will be loaded
even if the client has never been logged in.
This means that some functions might return null