33 lines
1.2 KiB
Java
33 lines
1.2 KiB
Java
package c.a.d;
|
|
|
|
import com.discord.app.AppLog;
|
|
import com.discord.utilities.logging.Logger;
|
|
import d0.z.d.m;
|
|
import java.util.ArrayList;
|
|
import rx.subjects.BehaviorSubject;
|
|
/* compiled from: AppState.kt */
|
|
public final class n {
|
|
public static final ArrayList<Object> a = new ArrayList<>(4);
|
|
public static final BehaviorSubject<Integer> b = BehaviorSubject.l0(0);
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public static final n f44c = new n();
|
|
|
|
public final synchronized void a(Object obj) {
|
|
m.checkNotNullParameter(obj, "consumer");
|
|
ArrayList<Object> arrayList = a;
|
|
arrayList.add(obj);
|
|
AppLog appLog = AppLog.g;
|
|
Logger.d$default(appLog, "Gateway Connection consumer add " + obj, null, 2, null);
|
|
b.onNext(Integer.valueOf(arrayList.size()));
|
|
}
|
|
|
|
public final synchronized void b(Object obj) {
|
|
m.checkNotNullParameter(obj, "consumer");
|
|
ArrayList<Object> arrayList = a;
|
|
arrayList.remove(obj);
|
|
AppLog appLog = AppLog.g;
|
|
Logger.d$default(appLog, "Gateway Connection consumer rm " + obj, null, 2, null);
|
|
b.onNext(Integer.valueOf(arrayList.size()));
|
|
}
|
|
}
|