mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-12 11:12:19 -04:00
fix slow first message
This commit is contained in:
parent
6c4b803091
commit
b0d4e35c6f
9 changed files with 141 additions and 5 deletions
|
@ -7,6 +7,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
|||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:stream_transform/stream_transform.dart';
|
||||
import 'package:veilid_support/veilid_support.dart';
|
||||
|
||||
import '../../../account_manager/account_manager.dart';
|
||||
import '../../layout/layout.dart';
|
||||
|
@ -83,6 +84,11 @@ class RouterCubit extends Cubit<RouterState> {
|
|||
path: '/new_account',
|
||||
builder: (context, state) => const NewAccountPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/new_account/recovery_key',
|
||||
builder: (context, state) =>
|
||||
ShowRecoveryKeyPage(secretKey: state.extra! as SecretKey),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/settings',
|
||||
builder: (context, state) => const SettingsPage(),
|
||||
|
@ -98,8 +104,6 @@ class RouterCubit extends Cubit<RouterState> {
|
|||
// No matter where we are, if there's not
|
||||
|
||||
switch (goRouterState.matchedLocation) {
|
||||
case '/new_account':
|
||||
return state.hasAnyAccount ? '/' : null;
|
||||
case '/':
|
||||
if (!state.hasAnyAccount) {
|
||||
return '/new_account';
|
||||
|
@ -130,6 +134,10 @@ class RouterCubit extends Cubit<RouterState> {
|
|||
return '/';
|
||||
}
|
||||
return null;
|
||||
case '/new_account':
|
||||
return null;
|
||||
case '/new_account/recovery_key':
|
||||
return null;
|
||||
case '/settings':
|
||||
return null;
|
||||
case '/developer':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue