Skip to content

Commit

Permalink
SearchBarController: Fix search history didn't get filtered properly
Browse files Browse the repository at this point in the history
  • Loading branch information
nullxception committed Jun 10, 2023
1 parent e909a7a commit 2a63c11
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ final searchBarControllerProvider =

class SearchBarController extends ChangeNotifier {
SearchBarController(this.ref, {required this.session}) {
textEditingController.addListener(_fetch);
textEditingController
..addListener(_fetch)
..addListener(notifyListeners);
}

final Ref ref;
Expand Down Expand Up @@ -99,7 +101,9 @@ class SearchBarController extends ChangeNotifier {
@override
void dispose() {
_textTimer?.cancel();
textEditingController.removeListener(_fetch);
textEditingController
..removeListener(notifyListeners)
..removeListener(_fetch);
super.dispose();
}
}

0 comments on commit 2a63c11

Please sign in to comment.