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
  3. 22
      gradlew

@ -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 {

22
gradlew vendored

@ -2,20 +2,20 @@
# #
# This file is part of FYReader. # This file is part of FYReader.
# FYReader is free software: you can redistribute it and/or modify # FYReader is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or # the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# FYReader is distributed in the hope that it will be useful, # FYReader is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with FYReader. If not, see <https://www.gnu.org/licenses/>. # along with FYReader. If not, see <https://www.gnu.org/licenses/>.
# #
# Copyright (C) 2020 - 2022 fengyuecanzhu # Copyright (C) 2020 - 2022 fengyuecanzhu
# #
############################################################################## ##############################################################################

Loading…
Cancel
Save