diff --git a/app/src/main/java/xyz/fycz/myreader/greendao/entity/Book.java b/app/src/main/java/xyz/fycz/myreader/greendao/entity/Book.java index e6909fb..0379bd4 100644 --- a/app/src/main/java/xyz/fycz/myreader/greendao/entity/Book.java +++ b/app/src/main/java/xyz/fycz/myreader/greendao/entity/Book.java @@ -413,4 +413,10 @@ public class Book implements Serializable { } return catheMap.get(key); } + + public void clearCathe(){ + if (catheMap != null) { + catheMap.clear(); + } + } } diff --git a/app/src/main/java/xyz/fycz/myreader/ui/activity/BookDetailedActivity.java b/app/src/main/java/xyz/fycz/myreader/ui/activity/BookDetailedActivity.java index d8bbce5..920908c 100644 --- a/app/src/main/java/xyz/fycz/myreader/ui/activity/BookDetailedActivity.java +++ b/app/src/main/java/xyz/fycz/myreader/ui/activity/BookDetailedActivity.java @@ -264,8 +264,10 @@ public class BookDetailedActivity extends BaseActivity { //换源对话框 mSourceDialog.setOnSourceChangeListener((bean, pos) -> { Book bookTem = (Book) mBook.clone(); + bookTem.clearCathe(); bookTem.setChapterUrl(bean.getChapterUrl()); bookTem.setInfoUrl(bean.getInfoUrl()); + bookTem.setSource(bean.getSource()); if (!StringHelper.isEmpty(bean.getImgUrl())) { bookTem.setImgUrl(bean.getImgUrl()); } @@ -284,7 +286,6 @@ public class BookDetailedActivity extends BaseActivity { if (!StringHelper.isEmpty(bean.getStatus())) { bookTem.setStatus(bean.getStatus()); } - bookTem.setSource(bean.getSource()); if (isCollected) { mBookService.updateBook(mBook, bookTem); } diff --git a/app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java b/app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java index f736b91..3280529 100644 --- a/app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java +++ b/app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java @@ -479,6 +479,7 @@ public class ReadActivity extends BaseActivity implements ColorPickerDialogListe mSourceDialog.setOnSourceChangeListener((bean, pos) -> { Book bookTem = (Book) mBook.clone(); + bookTem.clearCathe(); bookTem.setInfoUrl(bean.getInfoUrl()); bookTem.setChapterUrl(bean.getChapterUrl()); bookTem.setSource(bean.getSource()); diff --git a/app/src/main/java/xyz/fycz/myreader/util/help/JsExtensions.java b/app/src/main/java/xyz/fycz/myreader/util/help/JsExtensions.java index 5ce1fbe..f7dea3e 100644 --- a/app/src/main/java/xyz/fycz/myreader/util/help/JsExtensions.java +++ b/app/src/main/java/xyz/fycz/myreader/util/help/JsExtensions.java @@ -33,8 +33,6 @@ import xyz.fycz.myreader.util.utils.OkHttpUtils; import xyz.fycz.myreader.util.utils.StringUtils; @Keep - - @SuppressWarnings({"unused"}) public interface JsExtensions { String TAG = JsExtensions.class.getSimpleName();