mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-18 02:42:34 +01:00
fix: No client on logout
This commit is contained in:
parent
5904b150c6
commit
9396d29917
@ -74,6 +74,9 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
||||
widget.clients.indexWhere((client) => client.userID == matrixId);
|
||||
|
||||
int get _safeActiveClient {
|
||||
if (widget.clients.isEmpty) {
|
||||
widget.clients.add(getLoginClient());
|
||||
}
|
||||
if (activeClient < 0 || activeClient >= widget.clients.length) {
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user