Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
gedoor committed Nov 28, 2018
1 parent 4862cef commit 7caeb3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/src/main/assets/updateLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* 彩蛋,领支付宝红包有惊喜,支付宝禁用了口令红包,用搜索码领红包吧,麻烦一点
* 优质书源:http://book.hostfans.cn

**2018/11/26**
**2018/11/28**
* 修复一些BUG

**2018/11/24**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class PageLoaderNet extends PageLoader {

PageLoaderNet(PageView pageView, BookShelfBean bookShelfBean) {
super(pageView, bookShelfBean);
executorService = Executors.newFixedThreadPool(10);
executorService = Executors.newFixedThreadPool(20);
scheduler = Schedulers.from(executorService);
}

Expand Down Expand Up @@ -93,13 +93,13 @@ public void onComplete() {

@SuppressLint("DefaultLocale")
private synchronized void loadContent(final int chapterIndex) {
if (downloadingChapterList.size() >= 9) return;
if (downloadingChapterList.size() >= 20) return;
if (DownloadingList(listHandle.CHECK, bookShelfBean.getChapterList(chapterIndex).getDurChapterUrl()))
return;
DownloadingList(listHandle.ADD, bookShelfBean.getChapterList(chapterIndex).getDurChapterUrl());
if (null != bookShelfBean && bookShelfBean.getChapterList().size() > 0) {
Observable.create((ObservableOnSubscribe<Integer>) e -> {
if (shouldRequestChapter(chapterIndex)) {
DownloadingList(listHandle.ADD, bookShelfBean.getChapterList(chapterIndex).getDurChapterUrl());
e.onNext(chapterIndex);
}
e.onComplete();
Expand Down

0 comments on commit 7caeb3b

Please sign in to comment.