discord-jadx/app/src/main/java/com/discord/stores/StoreChannels$observeDefaul...

81 lines
3.5 KiB
Java

package com.discord.stores;
import c.d.b.a.a;
import com.airbnb.lottie.parser.AnimatableValueParser;
import com.discord.api.channel.Channel;
import com.discord.utilities.permissions.PermissionUtils;
import d0.f0.q;
import d0.t.u;
import d0.z.d.m;
import d0.z.d.o;
import j0.k.b;
import java.util.Map;
import kotlin.jvm.functions.Function1;
import rx.Observable;
/* compiled from: StoreChannels.kt */
public final class StoreChannels$observeDefaultChannel$1<T, R> implements b<Map<Long, ? extends Long>, Observable<? extends Channel>> {
public final /* synthetic */ long $guildId;
public final /* synthetic */ StoreChannels this$0;
/* compiled from: StoreChannels.kt */
/* renamed from: com.discord.stores.StoreChannels$observeDefaultChannel$1$1 reason: invalid class name */
public static final class AnonymousClass1<T, R> implements b<Map<Long, ? extends Channel>, Channel> {
public final /* synthetic */ Map $guildChannelPermissions;
/* compiled from: StoreChannels.kt */
/* renamed from: com.discord.stores.StoreChannels$observeDefaultChannel$1$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function1<Channel, Boolean> {
public final /* synthetic */ AnonymousClass1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(AnonymousClass1 r1) {
super(1);
this.this$0 = r1;
}
/* 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 // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Boolean invoke(Channel channel) {
return Boolean.valueOf(invoke(channel));
}
public final boolean invoke(Channel channel) {
m.checkNotNullParameter(channel, "channel");
return PermissionUtils.can(1024, (Long) a.d(channel, this.this$0.$guildChannelPermissions));
}
}
public AnonymousClass1(Map map) {
this.$guildChannelPermissions = map;
}
public final Channel call(Map<Long, Channel> map) {
return (Channel) q.firstOrNull(q.sortedWith(q.filter(u.asSequence(map.values()), new AnonymousClass1(this)), AnimatableValueParser.K0(Channel.Companion)));
}
/* 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 */ Channel call(Map<Long, ? extends Channel> map) {
return call((Map<Long, Channel>) map);
}
}
public StoreChannels$observeDefaultChannel$1(StoreChannels storeChannels, long j) {
this.this$0 = storeChannels;
this.$guildId = j;
}
/* 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 Channel> call(Map<Long, ? extends Long> map) {
return call((Map<Long, Long>) map);
}
public final Observable<? extends Channel> call(Map<Long, Long> map) {
return this.this$0.observeChannelsForGuild(this.$guildId, 0).F(new AnonymousClass1(map));
}
}