more debugging

This commit is contained in:
Christien Rioux 2024-02-14 21:33:15 -05:00
parent 9219e1307e
commit 5cec423351
13 changed files with 424 additions and 708 deletions

View file

@ -31,7 +31,9 @@ class RouterCubit extends Cubit<RouterState> {
// Watch for changes that the router will care about
Future.delayed(Duration.zero, () async {
await eventualInitialized.future;
emit(state.copyWith(isInitialized: true));
emit(state.copyWith(
isInitialized: true,
hasAnyAccount: accountRepository.getLocalAccounts().isNotEmpty));
});
// Subscribe to repository streams

View file

@ -118,7 +118,7 @@ class __$$RouterStateImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$RouterStateImpl implements _RouterState {
class _$RouterStateImpl with DiagnosticableTreeMixin implements _RouterState {
const _$RouterStateImpl(
{required this.isInitialized,
required this.hasAnyAccount,
@ -135,10 +135,20 @@ class _$RouterStateImpl implements _RouterState {
final bool hasActiveChat;
@override
String toString() {
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'RouterState(isInitialized: $isInitialized, hasAnyAccount: $hasAnyAccount, hasActiveChat: $hasActiveChat)';
}
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties
..add(DiagnosticsProperty('type', 'RouterState'))
..add(DiagnosticsProperty('isInitialized', isInitialized))
..add(DiagnosticsProperty('hasAnyAccount', hasAnyAccount))
..add(DiagnosticsProperty('hasActiveChat', hasActiveChat));
}
@override
bool operator ==(Object other) {
return identical(this, other) ||