Closed JAicewizard closed 4 days ago
This shouldn't be a real crash right? This is just caught by sentry. We can more or less avoid triggering new events on closed blocs, but the sentry logs of new states do not actually indicate any issue.
This can be fixed by adding a check in every cubit any time emit() is called of the cubit is clossed or not, but this is a lot of work.
@JeeVee11 Every event in the calendar screen can already have the cubit, that way the cubit will not be closed when closing events
Describe the bug
await _registrationsCubit.load();
should not be run in an async function as the cubit could have been closed see https://sentry.io/organizations/thalia/issues/3870488678/?project=1470826Maybe the same tactic as for the calendar cubit should be used? Same goes for the
_eventCubit.register()
as it the function might (for some weird reason) not actually run before the widget is disposed.How to reproduce
Steps to reproduce the behavior:
Expected behaviour
not crash