mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: dispose the listener when the favorite bloc dispose (#3103)
This commit is contained in:
parent
ea0c4e96d2
commit
a40c639a96
@ -58,6 +58,12 @@ class FavoriteBloc extends Bloc<FavoriteEvent, FavoriteState> {
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> close() async {
|
||||
await _listener.stop();
|
||||
return super.close();
|
||||
}
|
||||
|
||||
void _onFavoritesUpdated(
|
||||
Either<FlowyError, RepeatedViewPB> favoriteOrFailed,
|
||||
bool didFavorite,
|
||||
|
Loading…
Reference in New Issue
Block a user