72 lines
5.2 KiB
Java
72 lines
5.2 KiB
Java
package com.discord.widgets.chat.input;
|
|
|
|
import android.content.Context;
|
|
import androidx.appcompat.widget.AppCompatImageButton;
|
|
import androidx.fragment.app.Fragment;
|
|
import androidx.fragment.app.FragmentManager;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import c.b.a.d.d;
|
|
import com.discord.app.AppFragment;
|
|
import com.discord.utilities.drawable.DrawableCompat;
|
|
import com.lytefast.flexinput.R;
|
|
import com.lytefast.flexinput.adapters.AttachmentPreviewAdapter;
|
|
import com.lytefast.flexinput.fragment.FlexInputFragment;
|
|
import com.lytefast.flexinput.managers.FileManager;
|
|
import com.lytefast.flexinput.model.Attachment;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function0;
|
|
/* compiled from: WidgetChatInputAttachments.kt */
|
|
public final class WidgetChatInputAttachments$configureFlexInputFragment$1 extends o implements Function0<Unit> {
|
|
public final /* synthetic */ AppFragment $fragment;
|
|
public final /* synthetic */ WidgetChatInputAttachments this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetChatInputAttachments$configureFlexInputFragment$1(WidgetChatInputAttachments widgetChatInputAttachments, AppFragment appFragment) {
|
|
super(0);
|
|
this.this$0 = widgetChatInputAttachments;
|
|
this.$fragment = appFragment;
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final void mo1invoke() {
|
|
FlexInputFragment access$getFlexInputFragment$p = WidgetChatInputAttachments.access$getFlexInputFragment$p(this.this$0);
|
|
Context requireContext = access$getFlexInputFragment$p.requireContext();
|
|
m.checkNotNullExpressionValue(requireContext, "requireContext()");
|
|
Context requireContext2 = access$getFlexInputFragment$p.requireContext();
|
|
m.checkNotNullExpressionValue(requireContext2, "requireContext()");
|
|
Context requireContext3 = access$getFlexInputFragment$p.requireContext();
|
|
m.checkNotNullExpressionValue(requireContext3, "requireContext()");
|
|
d.a[] aVarArr = {new WidgetChatInputAttachments$configureFlexInputFragment$1$1$1(access$getFlexInputFragment$p, DrawableCompat.getThemedDrawableRes$default(requireContext, 2130969410, 0, 2, (Object) null), 2131886729), new WidgetChatInputAttachments$configureFlexInputFragment$1$1$2(access$getFlexInputFragment$p, DrawableCompat.getThemedDrawableRes$default(requireContext2, 2130969409, 0, 2, (Object) null), 2131886728), new WidgetChatInputAttachments$configureFlexInputFragment$1$1$3(access$getFlexInputFragment$p, DrawableCompat.getThemedDrawableRes$default(requireContext3, 2130969407, 0, 2, (Object) null), 2131887139)};
|
|
m.checkNotNullParameter(aVarArr, "pageSuppliers");
|
|
access$getFlexInputFragment$p.q = aVarArr;
|
|
FileManager fileManager = this.$fragment.getFileManager();
|
|
m.checkNotNullParameter(fileManager, "<set-?>");
|
|
access$getFlexInputFragment$p.o = fileManager;
|
|
access$getFlexInputFragment$p.m = new WidgetChatInputAttachments$configureFlexInputFragment$1$$special$$inlined$apply$lambda$1(this);
|
|
WidgetChatInputAttachments.access$getFlexInputFragment$p(this.this$0).k().setInputContentHandler(new WidgetChatInputAttachments$configureFlexInputFragment$1$$special$$inlined$apply$lambda$2(this));
|
|
AttachmentPreviewAdapter<Attachment<Object>> access$createPreviewAdapter = WidgetChatInputAttachments.access$createPreviewAdapter(this.this$0, this.$fragment.getContext());
|
|
m.checkNotNullParameter(access$createPreviewAdapter, "previewAdapter");
|
|
access$createPreviewAdapter.a.initFrom(access$getFlexInputFragment$p.b());
|
|
access$getFlexInputFragment$p.p = access$createPreviewAdapter;
|
|
RecyclerView recyclerView = access$getFlexInputFragment$p.j().d;
|
|
m.checkNotNullExpressionValue(recyclerView, "binding.attachmentPreviewList");
|
|
AttachmentPreviewAdapter<Attachment<Object>> attachmentPreviewAdapter = access$getFlexInputFragment$p.p;
|
|
if (attachmentPreviewAdapter == null) {
|
|
m.throwUninitializedPropertyAccessException("attachmentPreviewAdapter");
|
|
}
|
|
recyclerView.setAdapter(attachmentPreviewAdapter);
|
|
WidgetChatInputAttachments widgetChatInputAttachments = this.this$0;
|
|
FragmentManager childFragmentManager = this.$fragment.getChildFragmentManager();
|
|
m.checkNotNullExpressionValue(childFragmentManager, "fragment.childFragmentManager");
|
|
Fragment access$createAndConfigureExpressionFragment = WidgetChatInputAttachments.access$createAndConfigureExpressionFragment(widgetChatInputAttachments, childFragmentManager, WidgetChatInputAttachments.access$getFlexInputFragment$p(this.this$0).k());
|
|
if (access$createAndConfigureExpressionFragment != null) {
|
|
access$getFlexInputFragment$p.getChildFragmentManager().beginTransaction().replace(R.e.expression_tray_container, access$createAndConfigureExpressionFragment, access$createAndConfigureExpressionFragment.getClass().getSimpleName()).commit();
|
|
AppCompatImageButton appCompatImageButton = access$getFlexInputFragment$p.j().i;
|
|
m.checkNotNullExpressionValue(appCompatImageButton, "binding.expressionBtn");
|
|
appCompatImageButton.setVisibility(0);
|
|
}
|
|
}
|
|
}
|