fix: No client on logout

This commit is contained in:
Krille Fear 2021-10-14 17:05:59 +02:00
parent 5904b150c6
commit 9396d29917

View File

@ -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;
}