117 lines
7.1 KiB
Java
117 lines
7.1 KiB
Java
package com.discord.widgets.chat.input;
|
|
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import com.discord.databinding.WidgetChatInputApplicationCommandsBinding;
|
|
import com.discord.utilities.color.ColorCompat;
|
|
import com.discord.widgets.chat.input.autocomplete.Autocompletable;
|
|
import com.lytefast.flexinput.widget.FlexEditText;
|
|
import d0.z.d.k;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import java.util.List;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: WidgetChatInput.kt */
|
|
public final class WidgetChatInput$onViewBound$1 extends o implements Function0<Unit> {
|
|
public final /* synthetic */ WidgetChatInput this$0;
|
|
|
|
/* compiled from: WidgetChatInput.kt */
|
|
/* renamed from: com.discord.widgets.chat.input.WidgetChatInput$onViewBound$1$1 reason: invalid class name */
|
|
public static final /* synthetic */ class AnonymousClass1 extends k implements Function1<Autocompletable, Boolean> {
|
|
public AnonymousClass1(ChatInputViewModel chatInputViewModel) {
|
|
super(1, chatInputViewModel, ChatInputViewModel.class, "handleEmojiAutocompleteUpsellClicked", "handleEmojiAutocompleteUpsellClicked(Lcom/discord/widgets/chat/input/autocomplete/Autocompletable;)Z", 0);
|
|
}
|
|
|
|
/* 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(Autocompletable autocompletable) {
|
|
return Boolean.valueOf(invoke(autocompletable));
|
|
}
|
|
|
|
public final boolean invoke(Autocompletable autocompletable) {
|
|
m.checkNotNullParameter(autocompletable, "p1");
|
|
return ((ChatInputViewModel) this.receiver).handleEmojiAutocompleteUpsellClicked(autocompletable);
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChatInput.kt */
|
|
/* renamed from: com.discord.widgets.chat.input.WidgetChatInput$onViewBound$1$2 reason: invalid class name */
|
|
public static final /* synthetic */ class AnonymousClass2 extends k implements Function1<List<? extends Autocompletable>, Unit> {
|
|
public AnonymousClass2(ChatInputViewModel chatInputViewModel) {
|
|
super(1, chatInputViewModel, ChatInputViewModel.class, "checkEmojiAutocompleteUpsellViewed", "checkEmojiAutocompleteUpsellViewed(Ljava/util/List;)V", 0);
|
|
}
|
|
|
|
/* 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(List<? extends Autocompletable> list) {
|
|
invoke(list);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(List<? extends Autocompletable> list) {
|
|
m.checkNotNullParameter(list, "p1");
|
|
((ChatInputViewModel) this.receiver).checkEmojiAutocompleteUpsellViewed(list);
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChatInput.kt */
|
|
/* renamed from: com.discord.widgets.chat.input.WidgetChatInput$onViewBound$1$3 reason: invalid class name */
|
|
public static final /* synthetic */ class AnonymousClass3 extends k implements Function0<Unit> {
|
|
public AnonymousClass3(ChatInputViewModel chatInputViewModel) {
|
|
super(0, chatInputViewModel, ChatInputViewModel.class, "onAutocompletionsUpdated", "onAutocompletionsUpdated()V", 0);
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final void mo1invoke() {
|
|
((ChatInputViewModel) this.receiver).onAutocompletionsUpdated();
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetChatInput$onViewBound$1(WidgetChatInput widgetChatInput) {
|
|
super(0);
|
|
this.this$0 = widgetChatInput;
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final void mo1invoke() {
|
|
FlexEditText k = WidgetChatInput.access$getFlexInputFragment$p(this.this$0).k();
|
|
WidgetChatInput.access$getBinding$p(this.this$0).l.setBackgroundColor(ColorCompat.getThemedColor(this.this$0.requireContext(), 2130968905));
|
|
RecyclerView recyclerView = WidgetChatInput.access$getBinding$p(this.this$0).f1719c;
|
|
m.checkNotNullExpressionValue(recyclerView, "binding.chatInputCategoriesRecycler");
|
|
recyclerView.setItemAnimator(null);
|
|
WidgetChatInput widgetChatInput = this.this$0;
|
|
RecyclerView recyclerView2 = WidgetChatInput.access$getBinding$p(this.this$0).o;
|
|
m.checkNotNullExpressionValue(recyclerView2, "binding.chatInputStickersRecycler");
|
|
LinearLayout linearLayout = WidgetChatInput.access$getBinding$p(this.this$0).m;
|
|
m.checkNotNullExpressionValue(linearLayout, "binding.chatInputStickersContainer");
|
|
TextView textView = WidgetChatInput.access$getBinding$p(this.this$0).n;
|
|
m.checkNotNullExpressionValue(textView, "binding.chatInputStickersMatchingHeader");
|
|
TextView textView2 = WidgetChatInput.access$getBinding$p(this.this$0).k;
|
|
m.checkNotNullExpressionValue(textView2, "binding.chatInputEmojiMatchingHeader");
|
|
RecyclerView recyclerView3 = WidgetChatInput.access$getBinding$p(this.this$0).l;
|
|
m.checkNotNullExpressionValue(recyclerView3, "binding.chatInputMentionsRecycler");
|
|
RecyclerView recyclerView4 = WidgetChatInput.access$getBinding$p(this.this$0).f1719c;
|
|
m.checkNotNullExpressionValue(recyclerView4, "binding.chatInputCategoriesRecycler");
|
|
WidgetChatInputApplicationCommandsBinding widgetChatInputApplicationCommandsBinding = WidgetChatInput.access$getBinding$p(this.this$0).b;
|
|
m.checkNotNullExpressionValue(widgetChatInputApplicationCommandsBinding, "binding.applicationCommandsRoot");
|
|
WidgetChatInput.access$setChatInputEditTextHolder$p(widgetChatInput, new WidgetChatInputEditText(k, recyclerView2, linearLayout, textView, textView2, recyclerView3, recyclerView4, widgetChatInputApplicationCommandsBinding, new AnonymousClass1(WidgetChatInput.access$getViewModel$p(this.this$0)), new AnonymousClass2(WidgetChatInput.access$getViewModel$p(this.this$0)), new AnonymousClass3(WidgetChatInput.access$getViewModel$p(this.this$0)), null, 2048, null));
|
|
WidgetChatInputEditText access$getChatInputEditTextHolder$p = WidgetChatInput.access$getChatInputEditTextHolder$p(this.this$0);
|
|
if (access$getChatInputEditTextHolder$p != null) {
|
|
access$getChatInputEditTextHolder$p.configureMentionsDataSubscriptions(this.this$0);
|
|
}
|
|
WidgetChatInput.access$setChatInputTruncatedHint$p(this.this$0, new WidgetChatInputTruncatedHint(k));
|
|
WidgetChatInputTruncatedHint access$getChatInputTruncatedHint$p = WidgetChatInput.access$getChatInputTruncatedHint$p(this.this$0);
|
|
if (access$getChatInputTruncatedHint$p != null) {
|
|
access$getChatInputTruncatedHint$p.addBindedTextWatcher(this.this$0);
|
|
}
|
|
}
|
|
}
|