discord-jadx/app/src/main/java/com/discord/widgets/user/profile/UserProfileHeaderViewModel$Companion$observeStoreState$2.java
2021-07-24 04:37:17 +02:00

94 lines
6.3 KiB
Java

package com.discord.widgets.user.profile;
import com.discord.models.domain.ModelUserProfile;
import com.discord.models.experiments.domain.Experiment;
import com.discord.models.member.GuildMember;
import com.discord.models.user.MeUser;
import com.discord.models.user.User;
import com.discord.stores.StoreAccessibility;
import com.discord.stores.StoreChannels;
import com.discord.stores.StoreExperiments;
import com.discord.stores.StoreGuilds;
import com.discord.stores.StoreUserPresence;
import com.discord.stores.StoreUserProfile;
import com.discord.stores.StoreUserSettings;
import com.discord.utilities.streams.StreamContext;
import com.discord.utilities.streams.StreamContextService;
import com.discord.widgets.user.presence.ModelRichPresence;
import com.discord.widgets.user.profile.UserProfileHeaderViewModel;
import d0.t.n0;
import d0.z.d.m;
import j0.k.b;
import j0.l.a.c;
import java.util.Map;
import kotlin.Pair;
import rx.Observable;
import rx.functions.Func7;
/* compiled from: UserProfileHeaderViewModel.kt */
public final class UserProfileHeaderViewModel$Companion$observeStoreState$2<T, R> implements b<Pair<? extends MeUser, ? extends User>, Observable<? extends UserProfileHeaderViewModel.StoreState>> {
public final /* synthetic */ Long $channelId;
public final /* synthetic */ StoreAccessibility $storeAccessibility;
public final /* synthetic */ StoreChannels $storeChannels;
public final /* synthetic */ StoreExperiments $storeExperiments;
public final /* synthetic */ StoreGuilds $storeGuilds;
public final /* synthetic */ StoreUserPresence $storeUserPresence;
public final /* synthetic */ StoreUserProfile $storeUserProfile;
public final /* synthetic */ StoreUserSettings $storeUserSettings;
public final /* synthetic */ StreamContextService $streamContextService;
/* compiled from: UserProfileHeaderViewModel.kt */
/* renamed from: com.discord.widgets.user.profile.UserProfileHeaderViewModel$Companion$observeStoreState$2$1 reason: invalid class name */
public static final class AnonymousClass1<T1, T2, T3, T4, T5, T6, T7, R> implements Func7<Map<Long, ? extends GuildMember>, ModelRichPresence, StreamContext, ModelUserProfile, Experiment, Boolean, Boolean, UserProfileHeaderViewModel.StoreState> {
public final /* synthetic */ MeUser $meUser;
public final /* synthetic */ User $targetUser;
public AnonymousClass1(MeUser meUser, User user) {
this.$meUser = meUser;
this.$targetUser = user;
}
public final UserProfileHeaderViewModel.StoreState call(Map<Long, GuildMember> map, ModelRichPresence modelRichPresence, StreamContext streamContext, ModelUserProfile modelUserProfile, Experiment experiment, Boolean bool, Boolean bool2) {
MeUser meUser = this.$meUser;
m.checkNotNullExpressionValue(meUser, "meUser");
User user = this.$targetUser;
m.checkNotNullExpressionValue(map, "computedMembers");
m.checkNotNullExpressionValue(modelUserProfile, "userProfile");
m.checkNotNullExpressionValue(bool, "allowAnimatedEmojis");
boolean booleanValue = bool.booleanValue();
m.checkNotNullExpressionValue(bool2, "reducedMotionEnabled");
return new UserProfileHeaderViewModel.StoreState(meUser, user, map, modelRichPresence, streamContext, modelUserProfile, experiment, booleanValue, bool2.booleanValue());
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object] */
@Override // rx.functions.Func7
public /* bridge */ /* synthetic */ UserProfileHeaderViewModel.StoreState call(Map<Long, ? extends GuildMember> map, ModelRichPresence modelRichPresence, StreamContext streamContext, ModelUserProfile modelUserProfile, Experiment experiment, Boolean bool, Boolean bool2) {
return call((Map<Long, GuildMember>) map, modelRichPresence, streamContext, modelUserProfile, experiment, bool, bool2);
}
}
public UserProfileHeaderViewModel$Companion$observeStoreState$2(StoreChannels storeChannels, StoreGuilds storeGuilds, Long l, StoreUserPresence storeUserPresence, StreamContextService streamContextService, StoreUserProfile storeUserProfile, StoreExperiments storeExperiments, StoreUserSettings storeUserSettings, StoreAccessibility storeAccessibility) {
this.$storeChannels = storeChannels;
this.$storeGuilds = storeGuilds;
this.$channelId = l;
this.$storeUserPresence = storeUserPresence;
this.$streamContextService = streamContextService;
this.$storeUserProfile = storeUserProfile;
this.$storeExperiments = storeExperiments;
this.$storeUserSettings = storeUserSettings;
this.$storeAccessibility = storeAccessibility;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // j0.k.b
public /* bridge */ /* synthetic */ Observable<? extends UserProfileHeaderViewModel.StoreState> call(Pair<? extends MeUser, ? extends User> pair) {
return call((Pair<MeUser, ? extends User>) pair);
}
public final Observable<? extends UserProfileHeaderViewModel.StoreState> call(Pair<MeUser, ? extends User> pair) {
MeUser component1 = pair.component1();
User user = (User) pair.component2();
return user == null ? c.j : Observable.e(UserProfileHeaderViewModel.Companion.access$observeComputedMembers(UserProfileHeaderViewModel.Companion, this.$channelId, n0.setOf((Object[]) new Long[]{Long.valueOf(component1.getId()), Long.valueOf(user.getId())}), this.$storeChannels, this.$storeGuilds), ModelRichPresence.Companion.get(user.getId(), this.$storeUserPresence), this.$streamContextService.getForUser(user.getId(), true), this.$storeUserProfile.observeUserProfile(user.getId()), this.$storeExperiments.observeUserExperiment("2019-hypesquad_winner_badges", true), StoreUserSettings.observeIsAnimatedEmojisEnabled$default(this.$storeUserSettings, false, 1, null), this.$storeAccessibility.observeReducedMotionEnabled(), new AnonymousClass1(component1, user));
}
}