From 3240b1a03c248cecf6953604b5dc7653b2f101c7 Mon Sep 17 00:00:00 2001 From: fengyuecanzhu <1021300691@qq.com> Date: Fri, 3 Sep 2021 14:11:42 +0800 Subject: [PATCH] fix bug --- .../xyz/fycz/myreader/ui/activity/ReadActivity.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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 7649d56..2b8f2e0 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 @@ -280,13 +280,8 @@ public class ReadActivity extends BaseActivity implements ColorPickerDialogListe finish(); return; } - if (pagePos != -1 && chapterPos != -1) { - mBook.setHisttoryChapterNum(chapterPos); - mBook.setLastReadPosition(pagePos); - } else { - pagePos = mBook.getLastReadPosition(); - chapterPos = mBook.getHisttoryChapterNum(); - } + pagePos = mBook.getLastReadPosition(); + chapterPos = mBook.getHisttoryChapterNum(); if (SharedPreUtils.getInstance().getBoolean(getString(R.string.isNightFS), false)) { mSetting.setDayStyle(!ColorUtil.isColorLight(getResources().getColor(R.color.textPrimary))); } @@ -756,7 +751,7 @@ public class ReadActivity extends BaseActivity implements ColorPickerDialogListe } else if (itemId == R.id.action_replace_content) { Intent ruleIntent = new Intent(this, ReplaceRuleActivity.class); startActivityForResult(ruleIntent, APPCONST.REQUEST_REFRESH_READ_UI); - }else if(itemId == R.id.action_re_seg){ + } else if (itemId == R.id.action_re_seg) { mBook.setReSeg(!mBook.getReSeg()); mBookService.updateEntity(mBook); if (mPageLoader != null) { @@ -1583,6 +1578,7 @@ public class ReadActivity extends BaseActivity implements ColorPickerDialogListe public void onSubscribe(Disposable d) { addDisposable(d); } + @Override public void onNext(@NotNull String s) { downloadingChapter = chapter.getTitle();