discord-jadx/app/src/main/java/j0/l/a/k.java

82 lines
2.1 KiB
Java
Raw Normal View History

2021-11-08 18:25:28 +00:00
package j0.l.a;
2021-06-27 20:44:35 +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.g;
import j0.o.l;
2021-06-27 20:44:35 +00:00
import java.util.Arrays;
import rx.Observable;
import rx.Subscriber;
import rx.exceptions.CompositeException;
2022-03-02 20:59:20 +00:00
/* compiled from: OnSubscribeDoOnEach.java */
/* loaded from: classes3.dex */
2021-06-27 20:44:35 +00:00
public class k<T> implements Observable.a<T> {
2021-12-17 22:03:14 +00:00
public final g<? super T> j;
public final Observable<T> k;
2021-06-27 20:44:35 +00:00
2022-03-02 20:59:20 +00:00
/* compiled from: OnSubscribeDoOnEach.java */
/* loaded from: classes3.dex */
2021-06-27 20:44:35 +00:00
public static final class a<T> extends Subscriber<T> {
2021-12-17 22:03:14 +00:00
public final Subscriber<? super T> j;
public final g<? super T> k;
public boolean l;
2021-06-27 20:44:35 +00:00
public a(Subscriber<? super T> subscriber, g<? super T> gVar) {
super(subscriber);
2021-12-17 22:03:14 +00:00
this.j = subscriber;
this.k = gVar;
2021-06-27 20:44:35 +00:00
}
2021-11-08 18:25:28 +00:00
@Override // j0.g
2021-06-27 20:44:35 +00:00
public void onCompleted() {
2021-12-17 22:03:14 +00:00
if (!this.l) {
2021-06-27 20:44:35 +00:00
try {
2021-12-17 22:03:14 +00:00
this.k.onCompleted();
this.l = true;
2021-06-27 20:44:35 +00:00
this.j.onCompleted();
} catch (Throwable th) {
2022-01-27 00:50:41 +00:00
f.o1(th);
2021-06-27 20:44:35 +00:00
onError(th);
}
}
}
2021-11-08 18:25:28 +00:00
@Override // j0.g
2021-06-27 20:44:35 +00:00
public void onError(Throwable th) {
2021-12-17 22:03:14 +00:00
if (this.l) {
2021-06-27 20:44:35 +00:00
l.b(th);
return;
}
2021-12-17 22:03:14 +00:00
this.l = true;
2021-06-27 20:44:35 +00:00
try {
2021-12-17 22:03:14 +00:00
this.k.onError(th);
2021-06-27 20:44:35 +00:00
this.j.onError(th);
} catch (Throwable th2) {
2022-01-27 00:50:41 +00:00
f.o1(th2);
2021-12-17 22:03:14 +00:00
this.j.onError(new CompositeException(Arrays.asList(th, th2)));
2021-06-27 20:44:35 +00:00
}
}
2021-11-08 18:25:28 +00:00
@Override // j0.g
2021-06-27 20:44:35 +00:00
public void onNext(T t) {
2021-12-17 22:03:14 +00:00
if (!this.l) {
2021-06-27 20:44:35 +00:00
try {
2021-12-17 22:03:14 +00:00
this.k.onNext(t);
2021-06-27 20:44:35 +00:00
this.j.onNext(t);
} catch (Throwable th) {
2022-01-27 00:50:41 +00:00
f.p1(th, this, t);
2021-06-27 20:44:35 +00:00
}
}
}
}
public k(Observable<T> observable, g<? super T> gVar) {
2021-12-17 22:03:14 +00:00
this.k = observable;
this.j = gVar;
2021-06-27 20:44:35 +00:00
}
@Override // rx.functions.Action1
public void call(Object obj) {
2021-12-17 22:03:14 +00:00
this.k.i0(new a((Subscriber) obj, this.j));
2021-06-27 20:44:35 +00:00
}
}