mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-20 11:09:25 +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);
|
widget.clients.indexWhere((client) => client.userID == matrixId);
|
||||||
|
|
||||||
int get _safeActiveClient {
|
int get _safeActiveClient {
|
||||||
|
if (widget.clients.isEmpty) {
|
||||||
|
widget.clients.add(getLoginClient());
|
||||||
|
}
|
||||||
if (activeClient < 0 || activeClient >= widget.clients.length) {
|
if (activeClient < 0 || activeClient >= widget.clients.length) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user