2021-08-09 22:50:52 +00:00
|
|
|
package com.discord.utilities.rx;
|
|
|
|
|
|
|
|
import android.content.Context;
|
2021-08-18 07:29:27 +00:00
|
|
|
import c.a.q.m0.c.e;
|
2021-08-09 22:50:52 +00:00
|
|
|
import d0.z.d.m;
|
|
|
|
import j0.l.e.j;
|
|
|
|
import kotlin.jvm.functions.Function0;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
import rx.Observable;
|
|
|
|
import rx.Subscriber;
|
|
|
|
import rx.Subscription;
|
|
|
|
/* compiled from: OnDelayedEmissionHandler.kt */
|
|
|
|
public final class OnDelayedEmissionHandler$call$wrappedSubscriber$1 extends Subscriber<T> {
|
|
|
|
public final /* synthetic */ Subscriber $subscriber;
|
|
|
|
public final /* synthetic */ OnDelayedEmissionHandler this$0;
|
|
|
|
|
|
|
|
public OnDelayedEmissionHandler$call$wrappedSubscriber$1(OnDelayedEmissionHandler onDelayedEmissionHandler, Subscriber subscriber) {
|
|
|
|
this.this$0 = onDelayedEmissionHandler;
|
|
|
|
this.$subscriber = subscriber;
|
|
|
|
}
|
|
|
|
|
|
|
|
private final void tryFinish() {
|
|
|
|
Subscription access$getDelaySubscription$p = OnDelayedEmissionHandler.access$getDelaySubscription$p(this.this$0);
|
|
|
|
if (access$getDelaySubscription$p != null) {
|
|
|
|
access$getDelaySubscription$p.unsubscribe();
|
|
|
|
}
|
|
|
|
Observable<T> I = new j(null).I(OnDelayedEmissionHandler.access$getScheduler$p(this.this$0));
|
|
|
|
m.checkNotNullExpressionValue(I, "Observable\n .… .observeOn(scheduler)");
|
|
|
|
ObservableExtensionsKt.appSubscribe$default(I, OnDelayedEmissionHandler$call$wrappedSubscriber$1.class, (Context) null, (Function1) null, new OnDelayedEmissionHandler$call$wrappedSubscriber$1$tryFinish$2(this), (Function0) null, (Function0) null, new OnDelayedEmissionHandler$call$wrappedSubscriber$1$tryFinish$1(this), 54, (Object) null);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // j0.g
|
|
|
|
public void onCompleted() {
|
|
|
|
if (!this.$subscriber.isUnsubscribed()) {
|
|
|
|
tryFinish();
|
|
|
|
this.$subscriber.onCompleted();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // j0.g
|
|
|
|
public void onError(Throwable th) {
|
|
|
|
m.checkNotNullParameter(th, e.a);
|
|
|
|
if (!this.$subscriber.isUnsubscribed()) {
|
|
|
|
tryFinish();
|
|
|
|
this.$subscriber.onError(th);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // j0.g
|
|
|
|
public void onNext(T t) {
|
|
|
|
if (!this.$subscriber.isUnsubscribed()) {
|
|
|
|
tryFinish();
|
|
|
|
this.$subscriber.onNext(t);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|