fix(api): first unread cover should include in progress books

This commit is contained in:
Damien Deville 2024-04-22 19:49:50 -07:00 committed by GitHub
parent 02110962c1
commit 77c15f93f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -190,7 +190,7 @@ class BookDao(
.leftJoin(d).on(b.ID.eq(d.BOOK_ID))
.leftJoin(r).on(b.ID.eq(r.BOOK_ID)).and(r.USER_ID.eq(userId).or(r.USER_ID.isNull))
.where(b.SERIES_ID.eq(seriesId))
.and(r.COMPLETED.isNull)
.and(r.COMPLETED.isNull.or(r.COMPLETED.isFalse))
.orderBy(d.NUMBER_SORT)
.limit(1)
.fetchOne(b.ID)