mirror of
				https://github.com/AppFlowy-IO/AppFlowy.git
				synced 2025-11-03 19:43:52 +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(
 | 
					  void _onFavoritesUpdated(
 | 
				
			||||||
    Either<FlowyError, RepeatedViewPB> favoriteOrFailed,
 | 
					    Either<FlowyError, RepeatedViewPB> favoriteOrFailed,
 | 
				
			||||||
    bool didFavorite,
 | 
					    bool didFavorite,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user