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

58 lines
1.3 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
import androidx.recyclerview.widget.RecyclerView;
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.l.b.b;
2021-06-27 20:44:35 +00:00
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import rx.Subscriber;
2022-03-02 20:59:20 +00:00
/* compiled from: OperatorToObservableSortedList.java */
/* loaded from: classes3.dex */
2021-06-27 20:44:35 +00:00
public class p2 extends Subscriber<T> {
2021-12-17 22:03:14 +00:00
public List<T> j = new ArrayList(10);
public boolean k;
public final /* synthetic */ b l;
public final /* synthetic */ Subscriber m;
public final /* synthetic */ o2 n;
2021-06-27 20:44:35 +00:00
public p2(o2 o2Var, b bVar, Subscriber subscriber) {
2021-12-17 22:03:14 +00:00
this.n = o2Var;
this.l = bVar;
this.m = subscriber;
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.k) {
this.k = true;
List<T> list = this.j;
this.j = null;
2021-06-27 20:44:35 +00:00
try {
2021-12-17 22:03:14 +00:00
Collections.sort(list, this.n.j);
this.l.b(list);
2021-06-27 20:44:35 +00:00
} 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
this.m.onError(th);
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.k) {
this.j.add(t);
2021-06-27 20:44:35 +00:00
}
}
@Override // rx.Subscriber
public void onStart() {
request(RecyclerView.FOREVER_NS);
2021-06-27 20:44:35 +00:00
}
}