mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-12 11:12:19 -04:00
more refactor
This commit is contained in:
parent
ba4ef05a28
commit
b83aa3a64b
39 changed files with 722 additions and 514 deletions
|
@ -7,10 +7,7 @@ import 'package:go_router/go_router.dart';
|
|||
|
||||
import '../../../account_manager/account_manager.dart';
|
||||
import '../../init.dart';
|
||||
import '../../old_to_refactor/pages/chat_only.dart';
|
||||
import '../../old_to_refactor/pages/home.dart';
|
||||
import '../../old_to_refactor/pages/index.dart';
|
||||
import '../../old_to_refactor/pages/settings.dart';
|
||||
import '../../layout/layout.dart';
|
||||
import '../../tools/tools.dart';
|
||||
import '../../veilid_processor/views/developer.dart';
|
||||
|
||||
|
@ -32,7 +29,7 @@ class RouterCubit extends Cubit<RouterState> {
|
|||
});
|
||||
// Subscribe to repository streams
|
||||
_accountRepositorySubscription =
|
||||
accountRepository.changes().listen((event) {
|
||||
accountRepository.stream().listen((event) {
|
||||
switch (event) {
|
||||
case AccountRepositoryChange.localAccounts:
|
||||
emit(state.copyWith(
|
||||
|
@ -98,8 +95,8 @@ class RouterCubit extends Cubit<RouterState> {
|
|||
switch (goRouterState.matchedLocation) {
|
||||
case '/':
|
||||
|
||||
// Wait for veilid to be initialized
|
||||
if (!eventualVeilid.isCompleted) {
|
||||
// Wait for initialization to complete
|
||||
if (!eventualInitialized.isCompleted) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue