Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix min update break chapter issue #2

Merged
merged 1 commit into from
Feb 27, 2024
Merged

Conversation

kairi003
Copy link
Owner

Close #1

Overview

低負荷更新で目次の章が破損する

Causes

  • EpisodeFecher.moveNext で目次ページhtmlから章と話を読み込んでいる
  • 章は「何番目の章であるか」の整数で管理される (EpisodeFecher.mChapter)
  • 低負荷更新で途中から読み込むと章の順番が正常に読み取れない

Solutions

  • 前回の目次キャッシュ情報は UpdateManagerloadEpisode メソッド(private) で NovelBean オブジェクト をアップデートすることで確認できる
  • 章番号のみが NovelBean.getChapter() メソッドで入手できる
  • 低負荷更新時に今回更新範囲の1つ前の話の章番号を読込み、 EpisodeFechermChapterフィールドを更新する

ToDo

  • Modding.patchNovelHtml (目次ページhtml連結用メソッド) で、低負荷更新時に読込み開始話番号を ListBean オブジェクトに記録する
    • private int ListBean.updateStartNo フィールドとsetter/getterを作成
  • UpdateManager クラスで EpisodeFetcher オブジェクト作成後に上記updateStartNoを利用してupdateStartNo - 1 話の章番号をロード、 EpisodeFecher.mChapter を更新
    • EpisodeFecher.mChapter にはsetterがないため追加
    • UpdateManger のprivate要素を複数参照するため、Moddingクラスのstaticメソッドではなく、UpdateManagerのメソッドmodEpisodeFetcherChapterとして追加する

Copy link
Owner Author

@kairi003 kairi003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checked

@kairi003 kairi003 merged commit dbf6ee7 into master Feb 27, 2024
@kairi003 kairi003 deleted the fix-min-update-chapter branch February 27, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

低負荷更新で目次の章が破損する
1 participant