fix login redirect

This commit is contained in:
ggurdin 2026-02-02 12:21:17 -05:00
parent 138e0d93e5
commit af948eb35d
No known key found for this signature in database
GPG key ID: A01CB41737CBB478

View file

@ -199,7 +199,7 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
.stream
.where((l) => l == LoginState.loggedIn)
.first
.then((_) {
.then((_) async {
// #Pangea
MatrixState.pangeaController.handleLoginStateChange(
LoginState.loggedIn,
@ -216,7 +216,13 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
);
_registerSubs(_loginClientCandidate!.clientName);
_loginClientCandidate = null;
FluffyChatApp.router.go('/rooms');
// #Pangea
// FluffyChatApp.router.go('/rooms');
final isL2Set = await pangeaController.userController.isUserL2Set;
FluffyChatApp.router.go(
isL2Set ? '/rooms' : '/registration/create',
);
// Pangea#
});
// #Pangea
candidate.homeserver = Uri.parse("https://${AppConfig.defaultHomeserver}");