mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-22 17:20:43 +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
|
||||
? 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<Client> clients;
|
||||
final Map<String, String> 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<FluffyChatApp> {
|
||||
key: _matrix,
|
||||
context: context,
|
||||
router: _router,
|
||||
client: widget.client,
|
||||
clients: widget.clients,
|
||||
child: WaitForInitPage(child),
|
||||
);
|
||||
},
|
||||
|
@ -35,7 +35,7 @@ class Matrix extends StatefulWidget {
|
||||
|
||||
final BuildContext context;
|
||||
|
||||
final Client client;
|
||||
final List<Client> clients;
|
||||
|
||||
final Map<String, String> 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<Matrix> with WidgetsBindingObserver {
|
||||
Client get client => widget.client;
|
||||
Client get client => widget.clients.first;
|
||||
Store store = Store();
|
||||
BuildContext navigatorContext;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user