mihon/app/src/main/java/eu/kanade/tachiyomi
curche 7e3ea9074c
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`
2021-06-28 11:32:03 -04:00
..
annotations Fix annotations package name 2020-11-29 17:08:20 -05:00
data Sort per category (#5408) 2021-06-26 13:30:16 -04:00
extension Revert "Set background job expedited policies" 2021-06-09 17:11:23 -04:00
network Address some build warnings 2021-06-05 17:49:20 -04:00
source Address some Kotlin language warnings 2021-06-01 17:53:51 -04:00
ui Extend library search by adding -<source> option (#5387) 2021-06-28 11:32:03 -04:00
util Match ReaderActivity theme with the rest of the app (#5450) 2021-06-25 23:28:19 -04:00
widget Match ReaderActivity theme with the rest of the app (#5450) 2021-06-25 23:28:19 -04:00
App.kt Fix black icon for small notifications on EMUI (#5350) 2021-06-09 17:16:09 -04:00
AppModule.kt Address some build warnings 2021-06-05 17:49:20 -04:00
Migrations.kt Sort per category (#5408) 2021-06-26 13:30:16 -04:00