33 lines
2.1 KiB
Java
33 lines
2.1 KiB
Java
|
package com.discord.widgets.servers;
|
||
|
|
||
|
import com.discord.api.role.GuildRole;
|
||
|
import com.discord.models.domain.ModelGuildIntegration;
|
||
|
import com.discord.models.guild.Guild;
|
||
|
import com.discord.models.user.MeUser;
|
||
|
import com.discord.utilities.permissions.PermissionUtils;
|
||
|
import com.discord.widgets.servers.WidgetServerSettingsEditIntegration;
|
||
|
import java.util.Map;
|
||
|
import rx.functions.Func5;
|
||
|
/* compiled from: WidgetServerSettingsEditIntegration.kt */
|
||
|
public final class WidgetServerSettingsEditIntegration$Model$Companion$get$1<T1, T2, T3, T4, T5, R> implements Func5<MeUser, Guild, Map<Long, ? extends GuildRole>, Long, ModelGuildIntegration, WidgetServerSettingsEditIntegration.Model> {
|
||
|
public static final WidgetServerSettingsEditIntegration$Model$Companion$get$1 INSTANCE = new WidgetServerSettingsEditIntegration$Model$Companion$get$1();
|
||
|
|
||
|
public final WidgetServerSettingsEditIntegration.Model call(MeUser meUser, Guild guild, Map<Long, GuildRole> map, Long l, ModelGuildIntegration modelGuildIntegration) {
|
||
|
if (guild == null || map == null || l == null || modelGuildIntegration == null) {
|
||
|
return null;
|
||
|
}
|
||
|
GuildRole guildRole = map.get(Long.valueOf(modelGuildIntegration.getRoleId()));
|
||
|
if (!(modelGuildIntegration.isEnabled() && PermissionUtils.canAndIsElevated(32, l, meUser.getMfaEnabled(), guild.getMfaLevel()))) {
|
||
|
return null;
|
||
|
}
|
||
|
return new WidgetServerSettingsEditIntegration.Model(guild, modelGuildIntegration, guildRole);
|
||
|
}
|
||
|
|
||
|
/* 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, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object] */
|
||
|
@Override // rx.functions.Func5
|
||
|
public /* bridge */ /* synthetic */ WidgetServerSettingsEditIntegration.Model call(MeUser meUser, Guild guild, Map<Long, ? extends GuildRole> map, Long l, ModelGuildIntegration modelGuildIntegration) {
|
||
|
return call(meUser, guild, (Map<Long, GuildRole>) map, l, modelGuildIntegration);
|
||
|
}
|
||
|
}
|