discord-jadx/app/src/main/java/com/discord/widgets/servers/WidgetServerSettingsChannel...

43 lines
2.0 KiB
Java

package com.discord.widgets.servers;
import com.airbnb.lottie.parser.AnimatableValueParser;
import com.discord.api.channel.Channel;
import com.discord.utilities.permissions.PermissionUtils;
import com.discord.widgets.channels.settings.WidgetTextChannelSettings;
import com.discord.widgets.servers.WidgetServerSettingsChannels;
import com.discord.widgets.voice.settings.WidgetVoiceChannelSettings;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetServerSettingsChannels.kt */
public final class WidgetServerSettingsChannels$setOnClickListener$2 extends o implements Function1<Long, Unit> {
public final /* synthetic */ WidgetServerSettingsChannels.Model $model;
public final /* synthetic */ WidgetServerSettingsChannels this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetServerSettingsChannels$setOnClickListener$2(WidgetServerSettingsChannels widgetServerSettingsChannels, WidgetServerSettingsChannels.Model model) {
super(1);
this.this$0 = widgetServerSettingsChannels;
this.$model = model;
}
/* 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 */ Unit invoke(Long l) {
invoke(l.longValue());
return Unit.a;
}
public final void invoke(long j) {
if (PermissionUtils.can(16, this.$model.getChannelPermissions().get(Long.valueOf(j)))) {
Channel channel = this.$model.getChannels().get(Long.valueOf(j));
if (channel == null || !AnimatableValueParser.C1(channel)) {
WidgetTextChannelSettings.Companion.launch(j, this.this$0.requireContext());
} else {
WidgetVoiceChannelSettings.Companion.launch(j, this.this$0.requireContext());
}
}
}
}