discord-jadx/app/src/main/java/com/discord/utilities/coroutines/RxCoroutineExtensionsKt.java

38 lines
1.5 KiB
Java
Raw Normal View History

2021-06-27 20:44:35 +00:00
package com.discord.utilities.coroutines;
import android.content.Context;
2021-12-21 23:37:30 +00:00
import b.i.a.f.e.o.f;
2021-11-08 18:25:28 +00:00
import d0.z.d.m;
2021-06-27 20:44:35 +00:00
import kotlin.coroutines.Continuation;
import rx.Observable;
/* compiled from: RxCoroutineExtensions.kt */
2022-03-08 21:11:21 +00:00
/* loaded from: classes2.dex */
2021-06-27 20:44:35 +00:00
public final class RxCoroutineExtensionsKt {
public static final <T> Object appAwaitFirst(Observable<T> observable, Context context, Continuation<? super T> continuation) {
2021-10-26 23:51:06 +00:00
Observable<T> y2 = observable.y();
m.checkNotNullExpressionValue(y2, "first()");
2021-11-03 22:42:40 +00:00
return appAwaitSingle$default(y2, context, null, continuation, 2, null);
2021-06-27 20:44:35 +00:00
}
public static /* synthetic */ Object appAwaitFirst$default(Observable observable, Context context, Continuation continuation, int i, Object obj) {
if ((i & 1) != 0) {
context = null;
}
return appAwaitFirst(observable, context, continuation);
}
2021-11-03 22:42:40 +00:00
public static final <T> Object appAwaitSingle(Observable<T> observable, Context context, Boolean bool, Continuation<? super T> continuation) {
2022-01-27 00:50:41 +00:00
return f.M(new RxCoroutineExtensionsKt$appAwaitSingle$2(observable, context, bool, null), continuation);
2021-06-27 20:44:35 +00:00
}
2021-11-03 22:42:40 +00:00
public static /* synthetic */ Object appAwaitSingle$default(Observable observable, Context context, Boolean bool, Continuation continuation, int i, Object obj) {
2021-06-27 20:44:35 +00:00
if ((i & 1) != 0) {
context = null;
}
2021-11-03 22:42:40 +00:00
if ((i & 2) != 0) {
bool = Boolean.FALSE;
}
return appAwaitSingle(observable, context, bool, continuation);
2021-06-27 20:44:35 +00:00
}
}