From 3590b3a58aa660c6ba3c6ffc53cf3452ca779a26 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sat, 18 Sep 2021 11:26:57 +0200 Subject: [PATCH] feat: Pass clients through until matrix.dart --- lib/main.dart | 11 +++++------ lib/widgets/matrix.dart | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 90af2838..d4de6c2e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -50,25 +50,24 @@ void main() async { () => runApp(PlatformInfos.isMobile ? AppLock( builder: (args) => FluffyChatApp( - client: clients.first, + clients: clients, queryParameters: queryParameters, ), lockScreen: LockScreen(), enabled: false, ) - : FluffyChatApp( - client: clients.first, queryParameters: queryParameters)), + : FluffyChatApp(clients: clients, queryParameters: queryParameters)), SentryController.captureException, ); } class FluffyChatApp extends StatefulWidget { final Widget testWidget; - final Client client; + final List clients; final Map queryParameters; const FluffyChatApp( - {Key key, this.testWidget, @required this.client, this.queryParameters}) + {Key key, this.testWidget, @required this.clients, this.queryParameters}) : super(key: key); /// getInitialLink may rereturn the value multiple times if this view is @@ -142,7 +141,7 @@ class _FluffyChatAppState extends State { key: _matrix, context: context, router: _router, - client: widget.client, + clients: widget.clients, child: WaitForInitPage(child), ); }, diff --git a/lib/widgets/matrix.dart b/lib/widgets/matrix.dart index d9aadb29..1b3e996b 100644 --- a/lib/widgets/matrix.dart +++ b/lib/widgets/matrix.dart @@ -35,7 +35,7 @@ class Matrix extends StatefulWidget { final BuildContext context; - final Client client; + final List clients; final Map queryParameters; @@ -43,7 +43,7 @@ class Matrix extends StatefulWidget { this.child, @required this.router, @required this.context, - @required this.client, + @required this.clients, this.queryParameters, Key key, }) : super(key: key); @@ -57,7 +57,7 @@ class Matrix extends StatefulWidget { } class MatrixState extends State with WidgetsBindingObserver { - Client get client => widget.client; + Client get client => widget.clients.first; Store store = Store(); BuildContext navigatorContext;