52 lines
3.4 KiB
Java
52 lines
3.4 KiB
Java
package com.discord.widgets.chat.input;
|
|
|
|
import com.discord.api.channel.Channel;
|
|
import com.discord.panels.PanelState;
|
|
import com.discord.stores.StoreChannelsSelected;
|
|
import com.discord.stores.StoreNotices;
|
|
import com.discord.stores.StoreStream;
|
|
import com.discord.widgets.chat.input.AppFlexInputViewModel;
|
|
import d0.z.d.m;
|
|
import j0.k.b;
|
|
import rx.Observable;
|
|
import rx.functions.Func6;
|
|
/* compiled from: AppFlexInputViewModel.kt */
|
|
public final class AppFlexInputViewModel$Companion$observeStores$1<T, R> implements b<StoreChannelsSelected.ResolvedSelectedChannel, Observable<? extends AppFlexInputViewModel.StoreState>> {
|
|
public static final AppFlexInputViewModel$Companion$observeStores$1 INSTANCE = new AppFlexInputViewModel$Companion$observeStores$1();
|
|
|
|
/* compiled from: AppFlexInputViewModel.kt */
|
|
/* renamed from: com.discord.widgets.chat.input.AppFlexInputViewModel$Companion$observeStores$1$1 reason: invalid class name */
|
|
public static final class AnonymousClass1<T1, T2, T3, T4, T5, T6, R> implements Func6<PanelState, PanelState, Long, StoreNotices.Notice, Boolean, Boolean, AppFlexInputViewModel.StoreState> {
|
|
public final /* synthetic */ Channel $channel;
|
|
public final /* synthetic */ StoreChannelsSelected.ResolvedSelectedChannel $selectedChannel;
|
|
|
|
public AnonymousClass1(Channel channel, StoreChannelsSelected.ResolvedSelectedChannel resolvedSelectedChannel) {
|
|
this.$channel = channel;
|
|
this.$selectedChannel = resolvedSelectedChannel;
|
|
}
|
|
|
|
public final AppFlexInputViewModel.StoreState call(PanelState panelState, PanelState panelState2, Long l, StoreNotices.Notice notice, Boolean bool, Boolean bool2) {
|
|
boolean z2;
|
|
m.checkNotNullExpressionValue(panelState, "leftPanelState");
|
|
m.checkNotNullExpressionValue(panelState2, "rightPanelState");
|
|
Channel channel = this.$channel;
|
|
m.checkNotNullExpressionValue(bool, "stickerSuggestionsEnabled");
|
|
if (bool.booleanValue()) {
|
|
m.checkNotNullExpressionValue(bool2, "expressionSuggestionsEnabled");
|
|
if (bool2.booleanValue()) {
|
|
z2 = true;
|
|
return new AppFlexInputViewModel.StoreState(panelState, panelState2, channel, l, notice, z2, this.$selectedChannel instanceof StoreChannelsSelected.ResolvedSelectedChannel.ThreadDraft);
|
|
}
|
|
}
|
|
z2 = false;
|
|
return new AppFlexInputViewModel.StoreState(panelState, panelState2, channel, l, notice, z2, this.$selectedChannel instanceof StoreChannelsSelected.ResolvedSelectedChannel.ThreadDraft);
|
|
}
|
|
}
|
|
|
|
public final Observable<? extends AppFlexInputViewModel.StoreState> call(StoreChannelsSelected.ResolvedSelectedChannel resolvedSelectedChannel) {
|
|
Channel channelOrParent = resolvedSelectedChannel.getChannelOrParent();
|
|
StoreStream.Companion companion = StoreStream.Companion;
|
|
return Observable.f(companion.getNavigation().observeLeftPanelState(), companion.getNavigation().observeRightPanelState(), companion.getPermissions().observePermissionsForChannel(channelOrParent != null ? channelOrParent.h() : 0), companion.getNotices().getNotices(), companion.getUserSettings().observeIsStickerSuggestionsEnabled(), companion.getExpressionSuggestions().observeSuggestionsEnabled(), new AnonymousClass1(channelOrParent, resolvedSelectedChannel));
|
|
}
|
|
}
|