fix load book details when a book with the same name exists

pull/22/head
fengyuecanzhu 3 years ago
parent 509068e589
commit e1ae079ab6
  1. 3
      app/src/main/assets/updatelog.fy
  2. 8
      app/src/main/java/xyz/fycz/myreader/ui/activity/BookDetailedActivity.java

@ -1,6 +1,9 @@
风月读书v2.4.5 风月读书v2.4.5
更新内容: 更新内容:
1、修复书籍无法导出缓存的问题 1、修复书籍无法导出缓存的问题
2、修复部分书源bug
3、修复同名书籍详情页加载bug
4、Cookie支持备份&恢复
2022.04.24 2022.04.24
风月读书v2.4.4 风月读书v2.4.4

@ -386,7 +386,13 @@ public class BookDetailedActivity extends BaseActivity<ActivityBookDetailBinding
* @return * @return
*/ */
private boolean isBookCollected() { private boolean isBookCollected() {
Book book = mBookService.findBookByAuthorAndName(mBook.getName(), mBook.getAuthor()); Book book = null;
if (!TextUtils.isEmpty(mBook.getId())){
book = mBookService.getBookById(mBook.getId());
}
if (book == null) {
book = mBookService.findBookByAuthorAndName(mBook.getName(), mBook.getAuthor());
}
if (book == null) { if (book == null) {
return false; return false;
} else { } else {

Loading…
Cancel
Save