-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show empty library in case search doesn't match anything #251
Show empty library in case search doesn't match anything #251
Conversation
return filteredManga; | ||
}; | ||
): IMangaCard[] => | ||
performSearch(query, manga).filter((m) => downloadedFilter(downloaded, m) && unreadFilter(unread, m)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filtering the manga, before calling performSearch should increase the performance for large libraries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right it's not optimal currently.
I think the best way should be to perform search and filter on each manga in one go.
I'll open a new pr for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nervermind, changed it in this pr
return filteredManga; | ||
}; | ||
): IMangaCard[] => | ||
performSearch(query, manga).filter((m) => downloadedFilter(downloaded, m) && unreadFilter(unread, m)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
performSearch(query, manga).filter((m) => downloadedFilter(downloaded, m) && unreadFilter(unread, m)); | |
performSearch(query, manga.filter((m) => downloadedFilter(downloaded, m) && unreadFilter(unread, m))); |
something like this
In case the search didn't match anything all mangas where shown instead of an empty library.
Makes it easier to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In case the search didn't match anything all mangas where shown instead of an empty library.