forked from Juby210/discord-jadx
48 lines
2.0 KiB
Java
48 lines
2.0 KiB
Java
package com.discord.widgets.stage;
|
|
|
|
import c0.t.n;
|
|
import c0.z.d.m;
|
|
import c0.z.d.o;
|
|
import com.discord.api.permission.Permission;
|
|
import com.discord.api.stageinstance.StageInstance;
|
|
import com.discord.utilities.permissions.PermissionUtils;
|
|
import java.util.Collection;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: GuildIdsWithVisibleStageInstanceModel.kt */
|
|
public final class GuildIdsWithVisibleStageInstanceModel$compute$1 extends o implements Function1<Map.Entry<? extends Long, ? extends Map<Long, ? extends StageInstance>>, Boolean> {
|
|
public final /* synthetic */ Map $permissionsByChannel;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public GuildIdsWithVisibleStageInstanceModel$compute$1(Map map) {
|
|
super(1);
|
|
this.$permissionsByChannel = map;
|
|
}
|
|
|
|
/* 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(Map.Entry<? extends Long, ? extends Map<Long, ? extends StageInstance>> entry) {
|
|
return Boolean.valueOf(invoke((Map.Entry<Long, ? extends Map<Long, StageInstance>>) entry));
|
|
}
|
|
|
|
public final boolean invoke(Map.Entry<Long, ? extends Map<Long, StageInstance>> entry) {
|
|
int i;
|
|
m.checkNotNullParameter(entry, "<name for destructuring parameter 0>");
|
|
entry.getKey().longValue();
|
|
Set<Number> keySet = ((Map) entry.getValue()).keySet();
|
|
if (!(keySet instanceof Collection) || !keySet.isEmpty()) {
|
|
i = 0;
|
|
for (Number number : keySet) {
|
|
if (PermissionUtils.can(Permission.VIEW_CHANNEL, (Long) this.$permissionsByChannel.get(Long.valueOf(number.longValue()))) && (i = i + 1) < 0) {
|
|
n.throwCountOverflow();
|
|
}
|
|
}
|
|
} else {
|
|
i = 0;
|
|
}
|
|
return i > 0;
|
|
}
|
|
}
|