discord-jadx/app/src/main/java/com/discord/widgets/user/search/WidgetGlobalSearchModel$Com...

48 lines
2.5 KiB
Java

package com.discord.widgets.user.search;
import c.d.b.a.a;
import com.airbnb.lottie.parser.AnimatableValueParser;
import com.discord.api.channel.Channel;
import com.discord.models.user.User;
import com.discord.widgets.user.search.WidgetGlobalSearchModel;
import d0.z.d.m;
import d0.z.d.o;
import java.util.HashSet;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetGlobalSearchModel.kt */
public final class WidgetGlobalSearchModel$Companion$create$filteredResults$channelResults$2 extends o implements Function1<Channel, WidgetGlobalSearchModel.ItemDataPayload> {
public final /* synthetic */ String $sanitizedFilter;
public final /* synthetic */ HashSet $seenUsersIds;
public final /* synthetic */ WidgetGlobalSearchModel$Companion$create$4 $toItemChannel$4;
public final /* synthetic */ WidgetGlobalSearchModel$Companion$create$2 $toItemUser$2;
public final /* synthetic */ WidgetGlobalSearchModel.UsersContext $usersContext;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetGlobalSearchModel$Companion$create$filteredResults$channelResults$2(HashSet hashSet, WidgetGlobalSearchModel$Companion$create$2 widgetGlobalSearchModel$Companion$create$2, WidgetGlobalSearchModel.UsersContext usersContext, String str, WidgetGlobalSearchModel$Companion$create$4 widgetGlobalSearchModel$Companion$create$4) {
super(1);
this.$seenUsersIds = hashSet;
this.$toItemUser$2 = widgetGlobalSearchModel$Companion$create$2;
this.$usersContext = usersContext;
this.$sanitizedFilter = str;
this.$toItemChannel$4 = widgetGlobalSearchModel$Companion$create$4;
}
public final WidgetGlobalSearchModel.ItemDataPayload invoke(Channel channel) {
m.checkNotNullParameter(channel, "channel");
User v0 = AnimatableValueParser.v0(channel);
if (v0 != null) {
this.$seenUsersIds.add(Long.valueOf(v0.getId()));
WidgetGlobalSearchModel$Companion$create$2 widgetGlobalSearchModel$Companion$create$2 = this.$toItemUser$2;
User user = (User) a.c(v0, this.$usersContext.getUsers());
if (user != null) {
v0 = user;
}
WidgetGlobalSearchModel.ItemUser invoke = widgetGlobalSearchModel$Companion$create$2.invoke(v0, this.$sanitizedFilter, channel);
if (invoke != null) {
return invoke;
}
}
return this.$toItemChannel$4.invoke(channel, this.$sanitizedFilter);
}
}