discord-jadx/app/src/main/java/c/a/a/e/d.java

156 lines
6.9 KiB
Java
Raw Normal View History

2021-08-03 07:33:18 +00:00
package c.a.a.e;
2021-07-24 02:37:17 +00:00
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
2021-08-10 10:47:20 +00:00
import c.a.j.i1;
import com.discord.R;
2021-07-24 02:37:17 +00:00
import com.discord.app.AppDialog;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
2021-07-27 00:35:07 +00:00
import com.discord.views.premium.ShinyButton;
2021-07-24 02:37:17 +00:00
import com.discord.widgets.settings.premium.WidgetSettingsPremium;
import com.google.android.material.button.MaterialButton;
import d0.z.d.k;
import d0.z.d.m;
import java.util.Objects;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.reflect.KProperty;
/* compiled from: SingleValuePropPremiumUpsellDialog.kt */
2021-07-28 07:39:21 +00:00
public final class d extends AppDialog {
public static final /* synthetic */ KProperty[] i = {c.d.b.a.a.V(d.class, "binding", "getBinding()Lcom/discord/databinding/SingleValuePropPremiumUpsellDialogBinding;", 0)};
2021-07-24 02:37:17 +00:00
public static final b j = new b(null);
2021-07-28 07:39:21 +00:00
public final FragmentViewBindingDelegate k = FragmentViewBindingDelegateKt.viewBinding$default(this, c.i, null, 2, null);
2021-07-24 02:37:17 +00:00
/* compiled from: java-style lambda group */
public static final class a implements View.OnClickListener {
public final /* synthetic */ int i;
public final /* synthetic */ Object j;
public a(int i, Object obj) {
this.i = i;
this.j = obj;
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
int i = this.i;
2021-07-27 00:35:07 +00:00
if (i == 0) {
2021-07-28 07:39:21 +00:00
((d) this.j).dismiss();
2021-07-27 00:35:07 +00:00
} else if (i == 1) {
2021-07-28 07:39:21 +00:00
d dVar = (d) this.j;
KProperty[] kPropertyArr = d.i;
Objects.requireNonNull(dVar);
2021-07-27 00:35:07 +00:00
WidgetSettingsPremium.Companion companion = WidgetSettingsPremium.Companion;
2021-07-28 07:39:21 +00:00
Context requireContext = dVar.requireContext();
2021-07-27 00:35:07 +00:00
m.checkNotNullExpressionValue(requireContext, "requireContext()");
WidgetSettingsPremium.Companion.launch$default(companion, requireContext, null, null, 6, null);
2021-07-28 07:39:21 +00:00
dVar.dismiss();
2021-07-27 00:35:07 +00:00
} else {
2021-07-24 02:37:17 +00:00
throw null;
}
}
}
/* compiled from: SingleValuePropPremiumUpsellDialog.kt */
public static final class b {
public b(DefaultConstructorMarker defaultConstructorMarker) {
}
}
/* compiled from: SingleValuePropPremiumUpsellDialog.kt */
2021-08-10 10:47:20 +00:00
public static final /* synthetic */ class c extends k implements Function1<View, i1> {
2021-07-28 07:39:21 +00:00
public static final c i = new c();
2021-07-24 02:37:17 +00:00
2021-07-28 07:39:21 +00:00
public c() {
2021-08-10 10:47:20 +00:00
super(1, i1.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/SingleValuePropPremiumUpsellDialogBinding;", 0);
2021-07-24 02:37:17 +00:00
}
/* 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
2021-08-10 10:47:20 +00:00
public i1 invoke(View view) {
2021-07-24 02:37:17 +00:00
View view2 = view;
m.checkNotNullParameter(view2, "p1");
int i2 = R.id.button_container;
LinearLayout linearLayout = (LinearLayout) view2.findViewById(R.id.button_container);
2021-07-24 02:37:17 +00:00
if (linearLayout != null) {
i2 = R.id.close_button;
MaterialButton materialButton = (MaterialButton) view2.findViewById(R.id.close_button);
2021-07-24 02:37:17 +00:00
if (materialButton != null) {
i2 = R.id.content_background;
View findViewById = view2.findViewById(R.id.content_background);
2021-07-24 02:37:17 +00:00
if (findViewById != null) {
i2 = R.id.get_premium_button;
ShinyButton shinyButton = (ShinyButton) view2.findViewById(R.id.get_premium_button);
2021-07-27 00:35:07 +00:00
if (shinyButton != null) {
i2 = R.id.transparent_space;
View findViewById2 = view2.findViewById(R.id.transparent_space);
2021-07-24 02:37:17 +00:00
if (findViewById2 != null) {
i2 = R.id.upsell_body_text;
TextView textView = (TextView) view2.findViewById(R.id.upsell_body_text);
2021-07-24 02:37:17 +00:00
if (textView != null) {
i2 = R.id.upsell_header_text;
TextView textView2 = (TextView) view2.findViewById(R.id.upsell_header_text);
2021-07-24 02:37:17 +00:00
if (textView2 != null) {
i2 = R.id.value_prop_image;
ImageView imageView = (ImageView) view2.findViewById(R.id.value_prop_image);
2021-07-24 02:37:17 +00:00
if (imageView != null) {
2021-08-10 10:47:20 +00:00
return new i1((LinearLayout) view2, linearLayout, materialButton, findViewById, shinyButton, findViewById2, textView, textView2, imageView);
2021-07-24 02:37:17 +00:00
}
}
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i2)));
}
}
2021-07-28 07:39:21 +00:00
public d() {
super(R.layout.single_value_prop_premium_upsell_dialog);
2021-07-24 02:37:17 +00:00
}
2021-08-10 10:47:20 +00:00
public final i1 g() {
return (i1) this.k.getValue((Fragment) this, i[0]);
2021-07-24 02:37:17 +00:00
}
@Override // com.discord.app.AppDialog
public void onViewBound(View view) {
m.checkNotNullParameter(view, "view");
super.onViewBound(view);
Bundle arguments = getArguments();
String str = null;
Integer valueOf = arguments != null ? Integer.valueOf(arguments.getInt("extra_image_drawable_res")) : null;
Bundle arguments2 = getArguments();
String string = arguments2 != null ? arguments2.getString("extra_header_text") : null;
Bundle arguments3 = getArguments();
if (arguments3 != null) {
str = arguments3.getString("extra_body_text");
}
if (valueOf != null) {
g().f.setImageDrawable(ContextCompat.getDrawable(requireContext(), valueOf.intValue()));
}
if (string != null) {
TextView textView = g().e;
m.checkNotNullExpressionValue(textView, "binding.upsellHeaderText");
textView.setText(string);
}
if (str != null) {
TextView textView2 = g().d;
m.checkNotNullExpressionValue(textView2, "binding.upsellBodyText");
textView2.setText(str);
}
g().b.setOnClickListener(new a(0, this));
2021-08-10 10:47:20 +00:00
g().f107c.setOnClickListener(new a(1, this));
2021-07-24 02:37:17 +00:00
}
}