Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
gedoor committed Oct 17, 2021
1 parent 787a6f8 commit 46a3559
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import android.annotation.SuppressLint;
import android.text.TextUtils;
import android.util.Log;

import androidx.annotation.NonNull;

Expand Down Expand Up @@ -56,7 +55,7 @@ public void addBookUrl(String bookUrls) {
.compose(RxUtils::toSimpleSingle)
.subscribe(new MyObserver<BookShelfBean>() {
@Override
public void onNext(BookShelfBean bookShelfBean) {
public void onNext(@NonNull BookShelfBean bookShelfBean) {
getBook(bookShelfBean);
}

Expand Down Expand Up @@ -144,8 +143,7 @@ private Observable<BookShelfBean> addBookUrlO(String bookUrl) {
observable.subscribe(new MyObserver<List<BookSourceBean>>() {
@SuppressLint("DefaultLocale")
@Override
public void onNext(List<BookSourceBean> bookSourceBeans) {
Log.e("onNext", "bookSourceBeans.size=" + bookSourceBeans.size());
public void onNext(@NonNull List<BookSourceBean> bookSourceBeans) {
if (bookSourceBeans.size() == 1) {
BookSourceBean bean = (bookSourceBeans.get(0));
// BookShelfBean bookShelfBean = new BookShelfBean();
Expand Down Expand Up @@ -188,7 +186,7 @@ private void getBook(BookShelfBean bookShelfBean) {
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new MyObserver<BookShelfBean>() {
@Override
public void onNext(BookShelfBean value) {
public void onNext(@NonNull BookShelfBean value) {
if (value.getBookInfoBean().getChapterUrl() == null) {
mView.toast("添加书籍失败");
} else {
Expand Down

0 comments on commit 46a3559

Please sign in to comment.