Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
fix the search bar bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainaamr committed Jan 31, 2024
1 parent e286aa3 commit 5db4c91
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class CourseDetailState extends ConsumerState<CourseDetail> {
videoViewModelNotifier.updatedDisplayedStreams(temp);
isSearchInitialized = false;
} else {
displayedStreams = displayedStreams.where((stream) {
displayedStreams = temp.where((stream) {
return stream.item1.name.toLowerCase().contains(searchInput) ||
stream.item1.description.toLowerCase().contains(searchInput);
}).toList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class MyCoursesState extends ConsumerState<MyCourses> {
userViewModelNotifier.updatedDisplayedCourses(temp);
isSearchInitialized = false;
} else {
displayedCourses = displayedCourses.where((course) {
displayedCourses = temp.where((course) {
return course.name.toLowerCase().contains(searchInput) ||
course.slug.toLowerCase().contains(searchInput);
}).toList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class PublicCoursesState extends ConsumerState<PublicCourses> {
userViewModelNotifier.updatedDisplayedCourses(temp);
isSearchInitialized = false;
} else {
displayedCourses = displayedCourses.where((course) {
displayedCourses = temp.where((course) {
return course.name.toLowerCase().contains(searchInput) ||
course.slug.toLowerCase().contains(searchInput);
}).toList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class PinnedCoursesState extends ConsumerState<PinnedCourses> {
pinnedViewModelNotifier.updatedDisplayedPinnedCourses(temp);
isSearchInitialized = false;
} else {
displayedCourses = displayedCourses.where((course) {
displayedCourses = temp.where((course) {
return course.name.toLowerCase().contains(searchInput) ||
course.slug.toLowerCase().contains(searchInput);
}).toList();
Expand Down

0 comments on commit 5db4c91

Please sign in to comment.