diff --git a/app/src/main/assets/updatelog.fy b/app/src/main/assets/updatelog.fy index e65dda4..4a2ceaa 100644 --- a/app/src/main/assets/updatelog.fy +++ b/app/src/main/assets/updatelog.fy @@ -1,3 +1,10 @@ +2021.06.13 +风月读书v2.1.2 +更新内容: +1、修复搜索界面点击换一批闪退bug +2、支持epub文件导入阅读(仅支持文字) +3、阅读模块优化 + 2021.06.06 风月读书v2.1.1 更新内容: 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 2227705..4e71a5d 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 @@ -99,6 +99,7 @@ import xyz.fycz.myreader.util.help.StringHelper; import xyz.fycz.myreader.util.notification.NotificationClickReceiver; import xyz.fycz.myreader.util.notification.NotificationUtil; import xyz.fycz.myreader.util.utils.ColorUtil; +import xyz.fycz.myreader.util.utils.FileUtils; import xyz.fycz.myreader.util.utils.NetworkUtils; import xyz.fycz.myreader.util.utils.ScreenUtils; import xyz.fycz.myreader.util.utils.StringUtils; @@ -1022,7 +1023,8 @@ public class ReadActivity extends BaseActivity implements ColorPickerDialogListe private void skipToChapterAndPage(int chapterPos, int pagePos) { mPageLoader.setPrev(false); if (StringHelper.isEmpty(mChapters.get(chapterPos).getContent())) { - if ("本地书籍".equals(mBook.getType())) { + if ("本地书籍".equals(mBook.getType()) && + !mBook.getChapterUrl().endsWith(FileUtils.SUFFIX_EPUB)) { ToastUtils.showWarring("该章节无内容!"); return; } diff --git a/app/src/main/java/xyz/fycz/myreader/ui/fragment/FindFragment.java b/app/src/main/java/xyz/fycz/myreader/ui/fragment/FindFragment.java index 6d81ebe..2272590 100644 --- a/app/src/main/java/xyz/fycz/myreader/ui/fragment/FindFragment.java +++ b/app/src/main/java/xyz/fycz/myreader/ui/fragment/FindFragment.java @@ -40,7 +40,6 @@ import xyz.fycz.myreader.webapi.crawler.find.QiDianMobileRank; public class FindFragment extends BaseFragment { private FragmentFindBinding binding; - private Quotation quotation; @Override protected View bindView(LayoutInflater inflater, ViewGroup container) { @@ -49,23 +48,14 @@ public class FindFragment extends BaseFragment { } @Override - public void onResume() { - super.onResume(); + protected void initWidget(Bundle savedInstanceState) { getQuotation(); } @Override protected void initClick() { super.initClick(); - binding.findRlQuotation.setOnClickListener(v -> { - if (quotation == null) return; - ClipboardManager mClipboardManager = (ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE); - //数据 - ClipData mClipData = ClipData.newPlainText("Label", quotation.toString()); - //把数据设置到剪切板上 - mClipboardManager.setPrimaryClip(mClipData); - ToastUtils.showSuccess("语录已复制到剪切板"); - }); + binding.findRlQuotation.setOnClickListener(v -> getQuotation()); binding.findRlQidianTop.setOnClickListener(v -> comeToBookstore(new QiDianMobileRank(false))); binding.findRlQidianNsTop.setOnClickListener(v -> comeToBookstore(new QiDianMobileRank(true))); //binding.findRlXs7Top.setOnClickListener(v -> comeToBookstore(new XS7Rank())); @@ -91,7 +81,6 @@ public class FindFragment extends BaseFragment { }).compose(RxUtils::toSimpleSingle).subscribe(new MySingleObserver() { @Override public void onSuccess(@NotNull Quotation q) { - quotation = q; binding.tvQuotation.setText(q.getHitokoto()); binding.tvFrom.setText(String.format("--- %s", q.getFrom())); } diff --git a/app/src/main/java/xyz/fycz/myreader/util/utils/AdUtils.java b/app/src/main/java/xyz/fycz/myreader/util/utils/AdUtils.java index b60165c..ea72a67 100644 --- a/app/src/main/java/xyz/fycz/myreader/util/utils/AdUtils.java +++ b/app/src/main/java/xyz/fycz/myreader/util/utils/AdUtils.java @@ -123,9 +123,9 @@ public class AdUtils { public static void initAd() { if (!hasInitAd) { hasInitAd = true; - DdSdkHelper.init("1234", "216", "51716a16fbdf50905704b6575b1b3b60", - "142364", "35ce0efe5f3cc960b116db227498e238", - "8167", "85bd159309c3da1b", + DdSdkHelper.init("", "", "", + "", "", + "", "", App.getApplication(), true); } } diff --git a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/JiuTaoReadCrawler.java b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/JiuTaoReadCrawler.java index bebe047..eb6d949 100644 --- a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/JiuTaoReadCrawler.java +++ b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/JiuTaoReadCrawler.java @@ -60,7 +60,8 @@ public class JiuTaoReadCrawler extends BaseReadCrawler { String content = Html.fromHtml(divContent.html()).toString(); char c = 160; String spaec = "" + c; - content = content.replace(spaec, " ").replaceAll("您可以在.*最新章节!|\\\\", ""); + content = content.replace(spaec, " ") + .replaceAll("您可以在.*最新章节!|\\\\", ""); return content; }