Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
gedoor committed Oct 25, 2021
1 parent d3a55dd commit 5dbfcb0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -785,11 +785,15 @@ public void onChapterChange(int pos) {
mPresenter.getBookShelf().setDurChapterName(mPresenter.getChapterList().get(pos).getDurChapterName());
actionBar.setTitle(mPresenter.getBookShelf().getBookInfoBean().getName());
if (mPresenter.getBookShelf().getChapterListSize() > 0) {
BookChapterBean chapter = mPresenter.getChapterList().get(pos);
if (chapter.getIsVip() && !chapter.getIsPay()) {
toast("付费章节未购买,如已购买请登录并刷新目录");
}
binding.tvChapterName.setVisibility(View.VISIBLE);
binding.tvChapterName.setText(mPresenter.getChapterList().get(pos).getDurChapterName());
binding.tvChapterUrl.setVisibility(View.VISIBLE);
binding.tvChapterUrl.setText(NetworkUtils.getAbsoluteURL(mPresenter.getBookShelf().getBookInfoBean().getChapterUrl(),
mPresenter.getChapterList().get(pos).getDurChapterUrl()));
chapter.getDurChapterUrl()));
} else {
binding.tvChapterName.setVisibility(View.GONE);
binding.tvChapterUrl.setVisibility(View.GONE);
Expand Down

0 comments on commit 5dbfcb0

Please sign in to comment.