45 lines
2.4 KiB
Java
45 lines
2.4 KiB
Java
package com.discord.widgets.chat.input.applicationcommands;
|
|
|
|
import com.discord.stores.StoreStream;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: WidgetChatInputApplicationCommands.kt */
|
|
public final class WidgetChatInputApplicationCommands$configureObservables$2 extends o implements Function1<SelectedApplicationChat, Unit> {
|
|
public final /* synthetic */ WidgetChatInputApplicationCommands this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetChatInputApplicationCommands$configureObservables$2(WidgetChatInputApplicationCommands widgetChatInputApplicationCommands) {
|
|
super(1);
|
|
this.this$0 = widgetChatInputApplicationCommands;
|
|
}
|
|
|
|
/* 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(SelectedApplicationChat selectedApplicationChat) {
|
|
invoke(selectedApplicationChat);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(SelectedApplicationChat selectedApplicationChat) {
|
|
if (selectedApplicationChat.getBotUser() != null && selectedApplicationChat.getGuilldId() > 0) {
|
|
return;
|
|
}
|
|
if (selectedApplicationChat.getBotUser() != null) {
|
|
StoreStream.Companion.getApplicationCommands().handleDmUserApplication(selectedApplicationChat.getBotUser());
|
|
this.this$0.setApplicationIdForDm(Long.valueOf(selectedApplicationChat.getBotUser().getId()));
|
|
return;
|
|
}
|
|
this.this$0.setApplicationIdForDm(null);
|
|
StoreStream.Companion.getApplicationCommands().requestApplications(selectedApplicationChat.getGuilldId());
|
|
this.this$0.setGuildId(Long.valueOf(selectedApplicationChat.getGuilldId()));
|
|
String input = this.this$0.getInput();
|
|
if (input != null) {
|
|
String access$getCommandPrefix = WidgetChatInputApplicationCommands.access$getCommandPrefix(this.this$0, input);
|
|
WidgetChatInputApplicationCommands widgetChatInputApplicationCommands = this.this$0;
|
|
WidgetChatInputApplicationCommands.access$handleCommandToken(widgetChatInputApplicationCommands, access$getCommandPrefix, widgetChatInputApplicationCommands.getGuildId(), null, true);
|
|
}
|
|
}
|
|
}
|