21 lines
1.5 KiB
Java
21 lines
1.5 KiB
Java
package com.discord.widgets.chat.input;
|
|
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
import com.discord.api.channel.Channel;
|
|
import com.discord.stores.DiscoverCommands;
|
|
import com.discord.stores.StoreChannelsSelected;
|
|
import com.discord.widgets.chat.input.autocomplete.sources.ApplicationCommandsAutocompletableSource;
|
|
import d0.t.n;
|
|
import j0.k.b;
|
|
import j0.l.e.j;
|
|
import rx.Observable;
|
|
/* compiled from: WidgetChatInputAutocomplete.kt */
|
|
public final class WidgetChatInputAutocomplete$configureDataSubscriptions$5<T, R> implements b<StoreChannelsSelected.ResolvedSelectedChannel, Observable<? extends WidgetChatInputDiscoveryCommandsModel>> {
|
|
public static final WidgetChatInputAutocomplete$configureDataSubscriptions$5 INSTANCE = new WidgetChatInputAutocomplete$configureDataSubscriptions$5();
|
|
|
|
public final Observable<? extends WidgetChatInputDiscoveryCommandsModel> call(StoreChannelsSelected.ResolvedSelectedChannel resolvedSelectedChannel) {
|
|
Channel channelOrParent = resolvedSelectedChannel.getChannelOrParent();
|
|
return (channelOrParent == null || !(resolvedSelectedChannel instanceof StoreChannelsSelected.ResolvedSelectedChannel.Channel) || AnimatableValueParser.e1(channelOrParent)) ? new j(WidgetChatInputDiscoveryCommandsModel.Companion.parseModelDiscoveryCommands(n.emptyList(), DiscoverCommands.Companion.getDefaultModelDiscoveryCommands(), true, 3)) : ApplicationCommandsAutocompletableSource.Companion.getDiscoveryCommands(true, 3, channelOrParent.h());
|
|
}
|
|
}
|