44 lines
2.5 KiB
Java
44 lines
2.5 KiB
Java
package com.discord.widgets.channels;
|
|
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
import com.discord.api.channel.Channel;
|
|
import com.discord.stores.StoreChannels;
|
|
import com.discord.stores.StoreGuilds;
|
|
import com.discord.stores.StoreUser;
|
|
import com.discord.stores.StoreUserSettings;
|
|
import com.discord.widgets.channels.WidgetChannelTopicViewModel;
|
|
import j0.k.b;
|
|
import j0.l.e.j;
|
|
import rx.Observable;
|
|
/* compiled from: WidgetChannelTopicViewModel.kt */
|
|
public final class WidgetChannelTopicViewModel$Companion$observeStoreState$1<T, R> implements b<Channel, Observable<? extends WidgetChannelTopicViewModel.StoreState>> {
|
|
public final /* synthetic */ WidgetChannelTopicViewModel.Companion.NavState $navState;
|
|
public final /* synthetic */ StoreChannels $storeChannels;
|
|
public final /* synthetic */ StoreGuilds $storeGuilds;
|
|
public final /* synthetic */ StoreUserSettings $storeUserSettings;
|
|
public final /* synthetic */ StoreUser $storeUsers;
|
|
|
|
public WidgetChannelTopicViewModel$Companion$observeStoreState$1(WidgetChannelTopicViewModel.Companion.NavState navState, StoreGuilds storeGuilds, StoreUserSettings storeUserSettings, StoreChannels storeChannels, StoreUser storeUser) {
|
|
this.$navState = navState;
|
|
this.$storeGuilds = storeGuilds;
|
|
this.$storeUserSettings = storeUserSettings;
|
|
this.$storeChannels = storeChannels;
|
|
this.$storeUsers = storeUser;
|
|
}
|
|
|
|
public final Observable<? extends WidgetChannelTopicViewModel.StoreState> call(Channel channel) {
|
|
if (channel == null) {
|
|
return new j(new WidgetChannelTopicViewModel.StoreState.NoChannel(this.$navState.isRightPanelOpened(), this.$navState.isOnHomeTab()));
|
|
}
|
|
if (AnimatableValueParser.t1(channel)) {
|
|
return WidgetChannelTopicViewModel.Companion.access$mapChannelToPrivateStoreState(WidgetChannelTopicViewModel.Companion, channel, this.$navState, this.$storeGuilds, this.$storeUserSettings);
|
|
}
|
|
if (channel.z() != null) {
|
|
String z2 = channel.z();
|
|
if (!(z2 == null || z2.length() == 0)) {
|
|
return WidgetChannelTopicViewModel.Companion.access$mapChannelToGuildStoreState(WidgetChannelTopicViewModel.Companion, channel, this.$navState, this.$storeChannels, this.$storeUsers, this.$storeGuilds, this.$storeUserSettings);
|
|
}
|
|
}
|
|
return new j(new WidgetChannelTopicViewModel.StoreState.Guild.DefaultTopic(channel, this.$navState.isRightPanelOpened(), this.$navState.isOnHomeTab()));
|
|
}
|
|
}
|