145 lines
7.7 KiB
Java
145 lines
7.7 KiB
Java
package com.discord.widgets.channels;
|
|
|
|
import com.discord.models.user.User;
|
|
import com.discord.stores.StoreStream;
|
|
import d0.g0.w;
|
|
import d0.z.d.m;
|
|
import j0.k.b;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import rx.Observable;
|
|
/* compiled from: WidgetGroupInviteFriends.kt */
|
|
public final class WidgetGroupInviteFriends$Model$Companion$getFilteredFriends$2<T, R> implements b<List<Long>, Observable<? extends Map<Long, Integer>>> {
|
|
public final /* synthetic */ String $nameFilter;
|
|
|
|
/* compiled from: WidgetGroupInviteFriends.kt */
|
|
/* renamed from: com.discord.widgets.channels.WidgetGroupInviteFriends$Model$Companion$getFilteredFriends$2$1 reason: invalid class name */
|
|
public static final class AnonymousClass1<T, R> implements b<Map<Long, ? extends Integer>, Observable<? extends Map<Long, Integer>>> {
|
|
public final /* synthetic */ List $excludeUserIds;
|
|
public final /* synthetic */ WidgetGroupInviteFriends$Model$Companion$getFilteredFriends$2 this$0;
|
|
|
|
/* compiled from: WidgetGroupInviteFriends.kt */
|
|
/* renamed from: com.discord.widgets.channels.WidgetGroupInviteFriends$Model$Companion$getFilteredFriends$2$1$1 reason: invalid class name */
|
|
public static final class AnonymousClass1<T, R> implements b<Map<Long, ? extends User>, Observable<? extends Map<Long, Integer>>> {
|
|
public final /* synthetic */ Map $relationships;
|
|
public final /* synthetic */ AnonymousClass1 this$0;
|
|
|
|
/* compiled from: WidgetGroupInviteFriends.kt */
|
|
/* renamed from: com.discord.widgets.channels.WidgetGroupInviteFriends$Model$Companion$getFilteredFriends$2$1$1$1 reason: invalid class name */
|
|
public static final class AnonymousClass1<T, R> implements b<Map.Entry<? extends Long, ? extends Integer>, Boolean> {
|
|
public final /* synthetic */ Map $users;
|
|
public final /* synthetic */ AnonymousClass1 this$0;
|
|
|
|
public AnonymousClass1(AnonymousClass1 r1, Map map) {
|
|
this.this$0 = r1;
|
|
this.$users = map;
|
|
}
|
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:13:0x0047, code lost:
|
|
if (r0 != null) goto L_0x004c;
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:17:0x0052, code lost:
|
|
if (r5 != false) goto L_0x0056;
|
|
*/
|
|
public final Boolean call(Map.Entry<Long, Integer> entry) {
|
|
boolean z2;
|
|
User user;
|
|
String username;
|
|
String str;
|
|
boolean z3 = true;
|
|
if (!this.this$0.this$0.$excludeUserIds.contains(entry.getKey()) && this.$users.containsKey(entry.getKey())) {
|
|
Map map = this.$users;
|
|
if (map == null || (user = (User) map.get(entry.getKey())) == null || (username = user.getUsername()) == null) {
|
|
z2 = false;
|
|
} else {
|
|
String str2 = this.this$0.this$0.this$0.$nameFilter;
|
|
if (str2 != null) {
|
|
str = str2.toLowerCase();
|
|
m.checkNotNullExpressionValue(str, "(this as java.lang.String).toLowerCase()");
|
|
}
|
|
str = "";
|
|
z2 = w.contains((CharSequence) username, (CharSequence) str, true);
|
|
}
|
|
}
|
|
z3 = false;
|
|
return Boolean.valueOf(z3);
|
|
}
|
|
|
|
/* 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 */ Boolean call(Map.Entry<? extends Long, ? extends Integer> entry) {
|
|
return call((Map.Entry<Long, Integer>) entry);
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetGroupInviteFriends.kt */
|
|
/* renamed from: com.discord.widgets.channels.WidgetGroupInviteFriends$Model$Companion$getFilteredFriends$2$1$1$2 reason: invalid class name */
|
|
public static final class AnonymousClass2<T, R> implements b<Map.Entry<? extends Long, ? extends Integer>, Long> {
|
|
public static final AnonymousClass2 INSTANCE = new AnonymousClass2();
|
|
|
|
public final Long call(Map.Entry<Long, Integer> entry) {
|
|
return entry.getKey();
|
|
}
|
|
|
|
/* 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 */ Long call(Map.Entry<? extends Long, ? extends Integer> entry) {
|
|
return call((Map.Entry<Long, Integer>) entry);
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetGroupInviteFriends.kt */
|
|
/* renamed from: com.discord.widgets.channels.WidgetGroupInviteFriends$Model$Companion$getFilteredFriends$2$1$1$3 reason: invalid class name */
|
|
public static final class AnonymousClass3<T, R> implements b<Map.Entry<? extends Long, ? extends Integer>, Integer> {
|
|
public static final AnonymousClass3 INSTANCE = new AnonymousClass3();
|
|
|
|
public final Integer call(Map.Entry<Long, Integer> entry) {
|
|
return entry.getValue();
|
|
}
|
|
|
|
/* 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 */ Integer call(Map.Entry<? extends Long, ? extends Integer> entry) {
|
|
return call((Map.Entry<Long, Integer>) entry);
|
|
}
|
|
}
|
|
|
|
public AnonymousClass1(AnonymousClass1 r1, Map map) {
|
|
this.this$0 = r1;
|
|
this.$relationships = map;
|
|
}
|
|
|
|
public final Observable<? extends Map<Long, Integer>> call(Map<Long, ? extends User> map) {
|
|
return Observable.A(this.$relationships.entrySet()).x(new AnonymousClass1(this, map)).f0(AnonymousClass2.INSTANCE, AnonymousClass3.INSTANCE);
|
|
}
|
|
}
|
|
|
|
public AnonymousClass1(WidgetGroupInviteFriends$Model$Companion$getFilteredFriends$2 widgetGroupInviteFriends$Model$Companion$getFilteredFriends$2, List list) {
|
|
this.this$0 = widgetGroupInviteFriends$Model$Companion$getFilteredFriends$2;
|
|
this.$excludeUserIds = list;
|
|
}
|
|
|
|
/* 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 Map<Long, Integer>> call(Map<Long, ? extends Integer> map) {
|
|
return call((Map<Long, Integer>) map);
|
|
}
|
|
|
|
public final Observable<? extends Map<Long, Integer>> call(Map<Long, Integer> map) {
|
|
return StoreStream.Companion.getUsers().observeUsers(map.keySet()).X(new AnonymousClass1(this, map));
|
|
}
|
|
}
|
|
|
|
public WidgetGroupInviteFriends$Model$Companion$getFilteredFriends$2(String str) {
|
|
this.$nameFilter = str;
|
|
}
|
|
|
|
public final Observable<? extends Map<Long, Integer>> call(List<Long> list) {
|
|
return StoreStream.Companion.getUserRelationships().observeForType(1).X(new AnonymousClass1(this, list));
|
|
}
|
|
}
|