added support for multiple accounts, guardian login bugfixes, ui changes
This commit is contained in:
@@ -64,7 +64,10 @@ class _PrimaryTimetableScopeState extends State<PrimaryTimetableScope> {
|
||||
Widget build(BuildContext context) => MultiBlocListener(
|
||||
listeners: [
|
||||
BlocListener<AccountBloc, AccountState>(
|
||||
listenWhen: (a, b) => a.status != b.status,
|
||||
// While another account is being added, the session may already
|
||||
// belong to it; this scope is replaced once that account takes over.
|
||||
listenWhen: (a, b) =>
|
||||
a.status != b.status && b.status != AccountStatus.addingAccount,
|
||||
listener: (_, _) => _sync(),
|
||||
),
|
||||
BlocListener<CapabilitiesCubit, CapabilitiesState>(
|
||||
@@ -73,9 +76,6 @@ class _PrimaryTimetableScopeState extends State<PrimaryTimetableScope> {
|
||||
),
|
||||
BlocListener<ChildSelectionCubit, String?>(listener: (_, _) => _sync()),
|
||||
],
|
||||
child: BlocProvider<TimetableBloc>.value(
|
||||
value: _bloc,
|
||||
child: widget.child,
|
||||
),
|
||||
child: BlocProvider<TimetableBloc>.value(value: _bloc, child: widget.child),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user