discord-jadx/app/src/main/java/i0/d0/a/e.java

71 lines
2.2 KiB
Java
Raw Normal View History

2021-11-08 18:25:28 +00:00
package i0.d0.a;
2021-08-04 22:02:59 +00:00
2022-01-27 00:50:41 +00:00
import b.i.a.f.e.o.f;
2021-11-08 18:25:28 +00:00
import j0.o.o;
2021-08-04 22:02:59 +00:00
import java.util.Objects;
import retrofit2.Response;
import rx.Observable;
import rx.Subscriber;
import rx.exceptions.CompositeException;
import rx.exceptions.OnCompletedFailedException;
import rx.exceptions.OnErrorFailedException;
import rx.exceptions.OnErrorNotImplementedException;
2022-03-02 20:59:20 +00:00
/* compiled from: ResultOnSubscribe.java */
/* loaded from: classes3.dex */
2021-08-04 22:02:59 +00:00
public final class e<T> implements Observable.a<d<T>> {
2021-12-17 22:03:14 +00:00
public final Observable.a<Response<T>> j;
2021-08-04 22:02:59 +00:00
2022-03-02 20:59:20 +00:00
/* compiled from: ResultOnSubscribe.java */
/* loaded from: classes3.dex */
2021-08-04 22:02:59 +00:00
public static class a<R> extends Subscriber<Response<R>> {
2021-12-17 22:03:14 +00:00
public final Subscriber<? super d<R>> j;
2021-08-04 22:02:59 +00:00
public a(Subscriber<? super d<R>> subscriber) {
super(subscriber);
2021-12-17 22:03:14 +00:00
this.j = subscriber;
2021-08-04 22:02:59 +00:00
}
2021-11-08 18:25:28 +00:00
@Override // j0.g
2021-08-04 22:02:59 +00:00
public void onCompleted() {
2021-12-17 22:03:14 +00:00
this.j.onCompleted();
2021-08-04 22:02:59 +00:00
}
2021-11-08 18:25:28 +00:00
@Override // j0.g
2021-08-04 22:02:59 +00:00
public void onError(Throwable th) {
try {
2021-12-17 22:03:14 +00:00
Subscriber<? super d<R>> subscriber = this.j;
2021-08-04 22:02:59 +00:00
Objects.requireNonNull(th, "error == null");
subscriber.onNext(new d(null, th));
2021-12-17 22:03:14 +00:00
this.j.onCompleted();
2021-08-04 22:02:59 +00:00
} catch (Throwable th2) {
try {
2021-12-17 22:03:14 +00:00
this.j.onError(th2);
2021-08-04 22:02:59 +00:00
} catch (OnCompletedFailedException | OnErrorFailedException | OnErrorNotImplementedException unused) {
Objects.requireNonNull(o.a.b());
} catch (Throwable th3) {
2022-01-27 00:50:41 +00:00
f.o1(th3);
2021-08-04 22:02:59 +00:00
new CompositeException(th2, th3);
Objects.requireNonNull(o.a.b());
}
}
}
2021-11-08 18:25:28 +00:00
@Override // j0.g
2021-08-04 22:02:59 +00:00
public void onNext(Object obj) {
Response response = (Response) obj;
2021-12-17 22:03:14 +00:00
Subscriber<? super d<R>> subscriber = this.j;
2021-08-04 22:02:59 +00:00
Objects.requireNonNull(response, "response == null");
subscriber.onNext(new d(response, null));
}
}
public e(Observable.a<Response<T>> aVar) {
2021-12-17 22:03:14 +00:00
this.j = aVar;
2021-08-04 22:02:59 +00:00
}
@Override // rx.functions.Action1
public void call(Object obj) {
2021-12-17 22:03:14 +00:00
this.j.call(new a((Subscriber) obj));
2021-08-04 22:02:59 +00:00
}
}