2021-06-27 20:44:35 +00:00
|
|
|
package com.discord.widgets.channels;
|
|
|
|
|
|
|
|
import com.discord.models.user.User;
|
|
|
|
import com.discord.stores.StoreStream;
|
|
|
|
import com.discord.utilities.user.UserUtils;
|
|
|
|
import com.discord.widgets.channels.WidgetGroupInviteFriends;
|
|
|
|
import d0.z.d.m;
|
|
|
|
import j0.k.b;
|
|
|
|
import j0.l.e.j;
|
|
|
|
import java.util.Collection;
|
|
|
|
import java.util.List;
|
|
|
|
import rx.Observable;
|
|
|
|
/* compiled from: WidgetGroupInviteFriends.kt */
|
|
|
|
public final class WidgetGroupInviteFriends$Model$Companion$getForCreate$2<T, R> implements b<WidgetGroupInviteFriends.Model.Companion.AddedUsersInput, Observable<? extends WidgetGroupInviteFriends.Model>> {
|
|
|
|
public static final WidgetGroupInviteFriends$Model$Companion$getForCreate$2 INSTANCE = new WidgetGroupInviteFriends$Model$Companion$getForCreate$2();
|
|
|
|
|
|
|
|
/* compiled from: WidgetGroupInviteFriends.kt */
|
|
|
|
/* renamed from: com.discord.widgets.channels.WidgetGroupInviteFriends$Model$Companion$getForCreate$2$1 reason: invalid class name */
|
|
|
|
public static final class AnonymousClass1<T, R> implements b<WidgetGroupInviteFriends.Model.ModelAppUserRelationship, List<? extends WidgetGroupInviteFriends.Model.FriendItem>> {
|
|
|
|
public final /* synthetic */ WidgetGroupInviteFriends.Model.Companion.AddedUsersInput $usersFilter;
|
|
|
|
|
|
|
|
public AnonymousClass1(WidgetGroupInviteFriends.Model.Companion.AddedUsersInput addedUsersInput) {
|
|
|
|
this.$usersFilter = addedUsersInput;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final List<WidgetGroupInviteFriends.Model.FriendItem> call(WidgetGroupInviteFriends.Model.ModelAppUserRelationship modelAppUserRelationship) {
|
|
|
|
WidgetGroupInviteFriends.Model.FriendItem.Companion companion = WidgetGroupInviteFriends.Model.FriendItem.Companion;
|
|
|
|
m.checkNotNullExpressionValue(modelAppUserRelationship, "friends");
|
|
|
|
return companion.createData(modelAppUserRelationship, this.$usersFilter.getAddedUsers());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: WidgetGroupInviteFriends.kt */
|
|
|
|
/* renamed from: com.discord.widgets.channels.WidgetGroupInviteFriends$Model$Companion$getForCreate$2$2 reason: invalid class name */
|
|
|
|
public static final class AnonymousClass2<T, R> implements b<List<? extends WidgetGroupInviteFriends.Model.FriendItem>, Observable<? extends WidgetGroupInviteFriends.Model>> {
|
|
|
|
public final /* synthetic */ WidgetGroupInviteFriends.Model.Companion.AddedUsersInput $usersFilter;
|
|
|
|
|
|
|
|
public AnonymousClass2(WidgetGroupInviteFriends.Model.Companion.AddedUsersInput addedUsersInput) {
|
|
|
|
this.$usersFilter = addedUsersInput;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 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 WidgetGroupInviteFriends.Model> call(List<? extends WidgetGroupInviteFriends.Model.FriendItem> list) {
|
|
|
|
return call((List<WidgetGroupInviteFriends.Model.FriendItem>) list);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Observable<? extends WidgetGroupInviteFriends.Model> call(List<WidgetGroupInviteFriends.Model.FriendItem> list) {
|
|
|
|
String filter = this.$usersFilter.getFilter();
|
|
|
|
Collection<User> addedUsers = this.$usersFilter.getAddedUsers();
|
|
|
|
m.checkNotNullExpressionValue(list, "friendItems");
|
|
|
|
return new j(new WidgetGroupInviteFriends.Model(null, filter, addedUsers, list, 0, UserUtils.INSTANCE.isStaff(StoreStream.Companion.getUsers().getMe()) ? 25 : 10));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Observable<? extends WidgetGroupInviteFriends.Model> call(WidgetGroupInviteFriends.Model.Companion.AddedUsersInput addedUsersInput) {
|
2021-07-03 23:36:06 +00:00
|
|
|
return WidgetGroupInviteFriends.Model.Companion.access$getFilteredFriends(WidgetGroupInviteFriends.Model.Companion, null, addedUsersInput.getFilter()).F(new AnonymousClass1(addedUsersInput)).Y(new AnonymousClass2(addedUsersInput));
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|