mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-23 09:40:40 +01:00
feat: Pass clients through until matrix.dart
This commit is contained in:
parent
fdb5345412
commit
3590b3a58a
@ -50,25 +50,24 @@ void main() async {
|
|||||||
() => runApp(PlatformInfos.isMobile
|
() => runApp(PlatformInfos.isMobile
|
||||||
? AppLock(
|
? AppLock(
|
||||||
builder: (args) => FluffyChatApp(
|
builder: (args) => FluffyChatApp(
|
||||||
client: clients.first,
|
clients: clients,
|
||||||
queryParameters: queryParameters,
|
queryParameters: queryParameters,
|
||||||
),
|
),
|
||||||
lockScreen: LockScreen(),
|
lockScreen: LockScreen(),
|
||||||
enabled: false,
|
enabled: false,
|
||||||
)
|
)
|
||||||
: FluffyChatApp(
|
: FluffyChatApp(clients: clients, queryParameters: queryParameters)),
|
||||||
client: clients.first, queryParameters: queryParameters)),
|
|
||||||
SentryController.captureException,
|
SentryController.captureException,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
class FluffyChatApp extends StatefulWidget {
|
class FluffyChatApp extends StatefulWidget {
|
||||||
final Widget testWidget;
|
final Widget testWidget;
|
||||||
final Client client;
|
final List<Client> clients;
|
||||||
final Map<String, String> queryParameters;
|
final Map<String, String> queryParameters;
|
||||||
|
|
||||||
const FluffyChatApp(
|
const FluffyChatApp(
|
||||||
{Key key, this.testWidget, @required this.client, this.queryParameters})
|
{Key key, this.testWidget, @required this.clients, this.queryParameters})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
/// getInitialLink may rereturn the value multiple times if this view is
|
/// getInitialLink may rereturn the value multiple times if this view is
|
||||||
@ -142,7 +141,7 @@ class _FluffyChatAppState extends State<FluffyChatApp> {
|
|||||||
key: _matrix,
|
key: _matrix,
|
||||||
context: context,
|
context: context,
|
||||||
router: _router,
|
router: _router,
|
||||||
client: widget.client,
|
clients: widget.clients,
|
||||||
child: WaitForInitPage(child),
|
child: WaitForInitPage(child),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -35,7 +35,7 @@ class Matrix extends StatefulWidget {
|
|||||||
|
|
||||||
final BuildContext context;
|
final BuildContext context;
|
||||||
|
|
||||||
final Client client;
|
final List<Client> clients;
|
||||||
|
|
||||||
final Map<String, String> queryParameters;
|
final Map<String, String> queryParameters;
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ class Matrix extends StatefulWidget {
|
|||||||
this.child,
|
this.child,
|
||||||
@required this.router,
|
@required this.router,
|
||||||
@required this.context,
|
@required this.context,
|
||||||
@required this.client,
|
@required this.clients,
|
||||||
this.queryParameters,
|
this.queryParameters,
|
||||||
Key key,
|
Key key,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
@ -57,7 +57,7 @@ class Matrix extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
||||||
Client get client => widget.client;
|
Client get client => widget.clients.first;
|
||||||
Store store = Store();
|
Store store = Store();
|
||||||
BuildContext navigatorContext;
|
BuildContext navigatorContext;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user