31 lines
1.4 KiB
Java
31 lines
1.4 KiB
Java
package com.discord.widgets.auth;
|
|
|
|
import com.discord.api.channel.Channel;
|
|
import com.discord.stores.StoreStream;
|
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
|
import j0.k.b;
|
|
import j0.l.e.j;
|
|
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;
|
|
return valueOf == null ? new j(null) : ObservableExtensionsKt.takeSingleUntilTimeout$default(StoreStream.Companion.getChannels().observeDefaultChannel(valueOf.longValue()), 0, false, 3, null).F(AnonymousClass1.INSTANCE);
|
|
}
|
|
}
|