2021-08-03 07:33:18 +00:00
|
|
|
package com.discord.widgets.auth;
|
|
|
|
|
|
|
|
import com.discord.api.channel.Channel;
|
|
|
|
import com.discord.stores.StoreStream;
|
|
|
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
2021-10-15 06:18:26 +00:00
|
|
|
import i0.k.b;
|
|
|
|
import i0.l.e.j;
|
2021-08-03 07:33:18 +00:00
|
|
|
import rx.Observable;
|
|
|
|
/* compiled from: WidgetAgeVerifyViewModel.kt */
|
|
|
|
public final class WidgetAgeVerifyViewModel$Companion$observeStores$1<T, R> implements b<Channel, Observable<? extends Channel>> {
|
|
|
|
public static final WidgetAgeVerifyViewModel$Companion$observeStores$1 INSTANCE = new WidgetAgeVerifyViewModel$Companion$observeStores$1();
|
|
|
|
|
|
|
|
/* compiled from: WidgetAgeVerifyViewModel.kt */
|
|
|
|
/* renamed from: com.discord.widgets.auth.WidgetAgeVerifyViewModel$Companion$observeStores$1$1 reason: invalid class name */
|
|
|
|
public static final class AnonymousClass1<T, R> implements b<Channel, Channel> {
|
|
|
|
public static final AnonymousClass1 INSTANCE = new AnonymousClass1();
|
|
|
|
|
|
|
|
public final Channel call(Channel channel) {
|
|
|
|
if (channel == null || channel.o()) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
return channel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Observable<? extends Channel> call(Channel channel) {
|
|
|
|
Long valueOf = channel != null ? Long.valueOf(channel.f()) : null;
|
2021-10-22 06:43:45 +00:00
|
|
|
return valueOf == null ? new j(null) : ObservableExtensionsKt.takeSingleUntilTimeout$default(StoreStream.Companion.getChannels().observeDefaultChannel(valueOf.longValue()), 0, false, 3, null).F(AnonymousClass1.INSTANCE);
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|