discord-jadx/app/src/main/java/j0/l/a/p2.java
2021-06-27 22:53:42 +02:00

55 lines
1.3 KiB
Java

package j0.l.a;
import c.q.a.k.a;
import j0.l.b.b;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import rx.Subscriber;
/* compiled from: OperatorToObservableSortedList */
public class p2 extends Subscriber<T> {
public List<T> i = new ArrayList(10);
public boolean j;
public final /* synthetic */ b k;
public final /* synthetic */ Subscriber l;
public final /* synthetic */ o2 m;
public p2(o2 o2Var, b bVar, Subscriber subscriber) {
this.m = o2Var;
this.k = bVar;
this.l = subscriber;
}
@Override // j0.g
public void onCompleted() {
if (!this.j) {
this.j = true;
List<T> list = this.i;
this.i = null;
try {
Collections.sort(list, this.m.i);
this.k.b(list);
} catch (Throwable th) {
a.a0(th);
onError(th);
}
}
}
@Override // j0.g
public void onError(Throwable th) {
this.l.onError(th);
}
@Override // j0.g
public void onNext(T t) {
if (!this.j) {
this.i.add(t);
}
}
@Override // rx.Subscriber
public void onStart() {
request(Long.MAX_VALUE);
}
}