curche 9903a6bde8 Extend library search by adding -<source> option (#5387)
* extend library search to enable -<source> search

library search already allows for <source> search to select manga from a
particular source. Similarly, -<source> allows to search for manga that
aren't from the said source. TachiyomiSy has this feature but it heavily
depends on exh methods

A problem when you directly add a negation check is that although
it will work, the genre search kicks in adds back every manga since
-<source> returns true for all genres of a manga

Thus, the solution I decided on was do source search first, and then
move to genre check when it fails. A perhaps useful addition is that,
now you're able to search like this:
 <genre1>, -<source>, -<genre2>

* make if-else statements more readable

* refactor containsSourceOrGenre() using `when`

* add comment describing the function

* remove lazy

not really required anymore now that containsSourceOrGenre was rewritten
using `when`

(cherry picked from commit 7e3ea9074c65297177746182a5dfffb5e884c456)
2021-06-28 14:24:37 -04:00
..
2020-04-29 17:56:05 -04:00
2021-05-22 16:07:11 -04:00
2021-05-22 16:07:11 -04:00
2021-05-31 23:48:06 -04:00