discord-jadx/app/src/main/java/com/discord/widgets/chat/input/WidgetChatInput$configureSe...

48 lines
2.8 KiB
Java

package com.discord.widgets.chat.input;
import com.discord.widgets.chat.input.autocomplete.InputAutocomplete;
import com.discord.widgets.chat.input.models.ApplicationCommandData;
import com.lytefast.flexinput.model.Attachment;
import d0.z.d.m;
import d0.z.d.o;
import java.util.List;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
/* compiled from: WidgetChatInput.kt */
public final class WidgetChatInput$configureSendListeners$3 extends o implements Function2<List<? extends Attachment<?>>, Function1<? super Boolean, ? extends Unit>, Unit> {
public final /* synthetic */ WidgetChatInput$configureSendListeners$1 $sendCommand$1;
public final /* synthetic */ WidgetChatInput$configureSendListeners$2 $sendMessage$2;
public final /* synthetic */ WidgetChatInput this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChatInput$configureSendListeners$3(WidgetChatInput widgetChatInput, WidgetChatInput$configureSendListeners$1 widgetChatInput$configureSendListeners$1, WidgetChatInput$configureSendListeners$2 widgetChatInput$configureSendListeners$2) {
super(2);
this.this$0 = widgetChatInput;
this.$sendCommand$1 = widgetChatInput$configureSendListeners$1;
this.$sendMessage$2 = widgetChatInput$configureSendListeners$2;
}
/* 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] */
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(List<? extends Attachment<?>> list, Function1<? super Boolean, ? extends Unit> function1) {
invoke(list, (Function1<? super Boolean, Unit>) function1);
return Unit.a;
}
public final void invoke(List<? extends Attachment<?>> list, Function1<? super Boolean, Unit> function1) {
m.checkNotNullParameter(list, "attachmentsRaw");
m.checkNotNullParameter(function1, "onValidationResult");
InputAutocomplete access$getAutocomplete$p = WidgetChatInput.access$getAutocomplete$p(this.this$0);
ApplicationCommandData applicationCommandData = access$getAutocomplete$p != null ? access$getAutocomplete$p.getApplicationCommandData() : null;
if (applicationCommandData != null && !applicationCommandData.getValidInputs()) {
WidgetChatInput.access$getViewModel$p(this.this$0).onCommandInputsInvalid();
} else if (applicationCommandData == null || applicationCommandData.getApplicationCommand().getBuiltIn()) {
this.$sendMessage$2.invoke(list, applicationCommandData, function1);
} else {
this.$sendCommand$1.invoke(applicationCommandData, function1);
}
}
}