pull/21/head
fengyuecanzhu 3 years ago
parent 6f164eb501
commit 011e21327f
  1. 8
      app/release.md
  2. 14
      app/src/main/assets/updatelog.fy
  3. 2
      app/src/main/java/xyz/fycz/myreader/application/CrashHandler.java
  4. 4
      app/src/main/java/xyz/fycz/myreader/model/third3/webBook/BookChapterList.kt
  5. 1
      app/src/main/java/xyz/fycz/myreader/ui/activity/CrashActivity.java
  6. 51
      app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java
  7. 1
      app/src/main/java/xyz/fycz/myreader/ui/activity/RestartActivity.kt

@ -1,3 +1,5 @@
* 1、兼容第三方书源3.0版本(注意:需要重新导入书源) * 1、修复第三方书源书籍更新后未读章节提示不高亮的问题
* 2、修复已知bug * 2、修复日夜间切换闪退bug
* 3、优化部分功能 * 3、修复部分发现无法加载下一页的问题
* 4、新增应用崩溃记录界面
* 6、书源网络支持蓝奏云文件链接(如有密码,用逗号隔开)

@ -1,9 +1,11 @@
2022.01.23 2022.02.07
风月读书v2.3.5 风月读书v2.3.6
更新内容: 更新内容:
1、修复部分发现无法加载下一页的问题 1、修复第三方书源书籍更新后未读章节提示不高亮的问题
2、新增应用崩溃记录界面 2、修复日夜间切换闪退bug
3、书源网络支持蓝奏云文件链接(如有密码,用逗号隔开) 3、修复部分发现无法加载下一页的问题
4、新增应用崩溃记录界面
6、书源网络支持蓝奏云文件链接(如有密码,用逗号隔开)
2022.01.21 2022.01.21
风月读书v2.3.4 风月读书v2.3.4

@ -94,10 +94,8 @@ public final class CrashHandler implements Thread.UncaughtExceptionHandler {
boolean deadlyCrash = currentCrashTime - lastCrashTime < 1000 * 60 * 5; boolean deadlyCrash = currentCrashTime - lastCrashTime < 1000 * 60 * 5;
// 如果是致命的异常,或者是调试模式下 // 如果是致命的异常,或者是调试模式下
if (deadlyCrash || App.isDebug()) { if (deadlyCrash || App.isDebug()) {
ToastUtils.showError("程序发生致命错误");
CrashActivity.start(mApplication, throwable, logFilePath); CrashActivity.start(mApplication, throwable, logFilePath);
} else { } else {
ToastUtils.showError("程序发生错误,正在为您重启");
RestartActivity.Companion.start(mApplication); RestartActivity.Companion.start(mApplication);
} }

@ -124,12 +124,12 @@ object BookChapterList {
book.newestChapterTitle = list.last().title book.newestChapterTitle = list.last().title
book.historyChapterId = book.historyChapterId =
list.getOrNull(book.histtoryChapterNum)?.title ?: book.newestChapterTitle list.getOrNull(book.histtoryChapterNum)?.title ?: book.newestChapterTitle
if (book.chapterTotalNum < list.size) { /*if (book.chapterTotalNum < list.size) {
book.noReadNum = list.size - book.chapterTotalNum book.noReadNum = list.size - book.chapterTotalNum
book.lastReadTime = System.currentTimeMillis() book.lastReadTime = System.currentTimeMillis()
} }
book.lastReadTime = System.currentTimeMillis() book.lastReadTime = System.currentTimeMillis()
book.chapterTotalNum = list.size book.chapterTotalNum = list.size*/
return list return list
} }

@ -81,6 +81,7 @@ public class CrashActivity extends BaseActivity {
@Override @Override
protected void initData(Bundle savedInstanceState) { protected void initData(Bundle savedInstanceState) {
ToastUtils.showError("程序发生致命错误");
Throwable throwable = (Throwable) getIntent().getSerializableExtra(INTENT_CRASH_KEY); Throwable throwable = (Throwable) getIntent().getSerializableExtra(INTENT_CRASH_KEY);
logFilePath = getIntent().getStringExtra(INTENT_LOG_KEY); logFilePath = getIntent().getStringExtra(INTENT_LOG_KEY);
if (throwable == null) { if (throwable == null) {

@ -13,6 +13,7 @@ import android.content.pm.ActivityInfo;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.graphics.Color; import android.graphics.Color;
import android.net.Uri; import android.net.Uri;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.speech.tts.TextToSpeech; import android.speech.tts.TextToSpeech;
@ -421,7 +422,7 @@ public class ReadActivity extends BaseActivity implements ColorPickerDialogListe
pagePos = pos; pagePos = pos;
saveLastChapterReadPosition(); saveLastChapterReadPosition();
} }
mHandler.post(()->{ mHandler.post(() -> {
screenOffTimerStart(); screenOffTimerStart();
initMenu(); initMenu();
}); });
@ -1065,7 +1066,7 @@ public class ReadActivity extends BaseActivity implements ColorPickerDialogListe
* 保存最后阅读章节的进度 * 保存最后阅读章节的进度
*/ */
public void saveLastChapterReadPosition() { public void saveLastChapterReadPosition() {
if (!StringHelper.isEmpty(mBook.getId()) && mPageLoader.getPageStatus() == PageLoader.STATUS_FINISH) { if (mBook != null && !StringHelper.isEmpty(mBook.getId()) && mPageLoader.getPageStatus() == PageLoader.STATUS_FINISH) {
mBook.setLastReadPosition(pagePos); mBook.setLastReadPosition(pagePos);
mBook.setHisttoryChapterNum(chapterPos); mBook.setHisttoryChapterNum(chapterPos);
mBookService.updateEntity(mBook); mBookService.updateEntity(mBook);
@ -1384,28 +1385,32 @@ public class ReadActivity extends BaseActivity implements ColorPickerDialogListe
private void changeNightAndDaySetting(boolean isNight) { private void changeNightAndDaySetting(boolean isNight) {
mSetting.setDayStyle(!isNight); mSetting.setDayStyle(!isNight);
SysManager.saveSetting(mSetting); SysManager.saveSetting(mSetting);
toggleMenu(true); if (Build.VERSION.SDK_INT >= 31) {
mHandler.postDelayed(() -> { toggleMenu(true);
Intent intent = new Intent(this, ReadActivity.class); mHandler.postDelayed(() -> {
if (aBooks != null) { Intent intent = new Intent(this, ReadActivity.class);
intent.putExtra(APPCONST.SOURCE_INDEX, mSourceDialog.getSourceIndex()); if (aBooks != null) {
BitIntentDataManager.getInstance().putData(intent, aBooks); intent.putExtra(APPCONST.SOURCE_INDEX, mSourceDialog.getSourceIndex());
} else { BitIntentDataManager.getInstance().putData(intent, aBooks);
BitIntentDataManager.getInstance().putData(intent, mBook); } else {
} BitIntentDataManager.getInstance().putData(intent, mBook);
if (!isCollected) { }
intent.putExtra("isCollected", false); if (!isCollected) {
} intent.putExtra("isCollected", false);
exit(); }
exit();
App.getApplication().setNightTheme(isNight);
startActivity(intent);
}, mBottomOutAnim.getDuration());
} else {
App.getApplication().setNightTheme(isNight); App.getApplication().setNightTheme(isNight);
startActivity(intent); mHandler.postDelayed(() -> {
}, mBottomOutAnim.getDuration()); AppCompatActivity activity = ActivityManage.getByClass(this.getClass());
/*mHandler.postDelayed(() -> { if (activity != null) {
AppCompatActivity activity = ActivityManage.getByClass(this.getClass()); BaseDialog.initActivityContext(activity);
if (activity != null) { }
BaseDialog.initActivityContext(activity); }, 1000);
} }
}, 1000);*/
//mPageLoader.setPageStyle(!isCurDayStyle); //mPageLoader.setPageStyle(!isCurDayStyle);
} }

@ -26,6 +26,7 @@ class RestartActivity : BaseActivity() {
} }
fun restart(context: Context) { fun restart(context: Context) {
ToastUtils.showError("程序发生错误,正在为您重启")
val intent = Intent(context, MainActivity::class.java) val intent = Intent(context, MainActivity::class.java)
if (context !is Activity) { if (context !is Activity) {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)

Loading…
Cancel
Save