discord-jadx/app/src/main/java/j0/l/a/e1.java
2021-07-04 01:36:06 +02:00

94 lines
2.3 KiB
Java

package j0.l.a;
import j0.o.l;
import rx.Observable;
import rx.Producer;
import rx.Subscriber;
import rx.subscriptions.SerialSubscription;
/* compiled from: OperatorOnErrorResumeNextViaFunction */
public class e1 extends Subscriber<T> {
public boolean i;
public long j;
public final /* synthetic */ Subscriber k;
public final /* synthetic */ j0.l.b.a l;
public final /* synthetic */ SerialSubscription m;
public final /* synthetic */ f1 n;
/* compiled from: OperatorOnErrorResumeNextViaFunction */
public class a extends Subscriber<T> {
public a() {
}
@Override // j0.g
public void onCompleted() {
e1.this.k.onCompleted();
}
@Override // j0.g
public void onError(Throwable th) {
e1.this.k.onError(th);
}
@Override // j0.g
public void onNext(T t) {
e1.this.k.onNext(t);
}
@Override // rx.Subscriber
public void setProducer(Producer producer) {
e1.this.l.c(producer);
}
}
public e1(f1 f1Var, Subscriber subscriber, j0.l.b.a aVar, SerialSubscription serialSubscription) {
this.n = f1Var;
this.k = subscriber;
this.l = aVar;
this.m = serialSubscription;
}
@Override // j0.g
public void onCompleted() {
if (!this.i) {
this.i = true;
this.k.onCompleted();
}
}
@Override // j0.g
public void onError(Throwable th) {
if (this.i) {
c.q.a.k.a.a0(th);
l.b(th);
return;
}
this.i = true;
try {
unsubscribe();
a aVar = new a();
this.m.a(aVar);
long j = this.j;
if (j != 0) {
this.l.b(j);
}
((Observable) this.n.i.call(th)).i0(aVar);
} catch (Throwable th2) {
Subscriber subscriber = this.k;
c.q.a.k.a.a0(th2);
subscriber.onError(th2);
}
}
@Override // j0.g
public void onNext(T t) {
if (!this.i) {
this.j++;
this.k.onNext(t);
}
}
@Override // rx.Subscriber
public void setProducer(Producer producer) {
this.l.c(producer);
}
}