Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
gedoor committed Oct 31, 2018
1 parent 20abbdf commit 8c9e3e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ chapterIndex, getBook().getChapterList(chapterIndex).getDurChapterName())
public void onSubscribe(Disposable d) {
compositeDisposable.add(d);
handler.postDelayed(() -> {
DownloadingList(listHandle.REMOVE, getBook().getChapterList(chapterIndex).getDurChapterUrl());
d.dispose();
if (!d.isDisposed() && getBook() != null) {
DownloadingList(listHandle.REMOVE, getBook().getChapterList(chapterIndex).getDurChapterUrl());
d.dispose();
}
}, 30 * 1000);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,10 @@ private boolean canNotTurnPage() {
}

BookShelfBean getBook() {
return mPageView.getActivity().getBook();
if (mPageView != null) {
return mPageView.getActivity().getBook();
}
return null;
}

/**
Expand Down

0 comments on commit 8c9e3e7

Please sign in to comment.