discord-jadx/app/src/main/java/b/a/a/b/c.java

174 lines
8.0 KiB
Java
Raw Normal View History

2021-12-17 21:59:34 +00:00
package b.a.a.b;
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.annotation.DrawableRes;
2022-02-01 08:01:17 +00:00
import androidx.core.content.ContextCompat;
2021-07-24 02:37:17 +00:00
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
2022-02-01 08:01:17 +00:00
import b.a.i.n1;
import com.discord.R;
2021-07-24 02:37:17 +00:00
import com.discord.app.AppDialog;
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.analytics.Traits;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
2022-02-01 08:01:17 +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;
2021-11-02 06:38:17 +00:00
import d0.z.d.k;
import d0.z.d.m;
2021-07-24 02:37:17 +00:00
import java.util.Objects;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.reflect.KProperty;
2022-02-01 08:01:17 +00:00
/* compiled from: SingleValuePropPremiumUpsellDialog.kt */
2021-12-17 21:59:34 +00:00
public final class c extends AppDialog {
2022-02-01 08:01:17 +00:00
public static final /* synthetic */ KProperty[] j = {b.d.b.a.a.b0(c.class, "binding", "getBinding()Lcom/discord/databinding/SingleValuePropPremiumUpsellDialogBinding;", 0)};
2021-12-17 21:59:34 +00:00
public static final b k = new b(null);
2022-02-01 08:01:17 +00:00
public final FragmentViewBindingDelegate l = FragmentViewBindingDelegateKt.viewBinding$default(this, C0009c.j, null, 2, null);
2021-07-24 02:37:17 +00:00
/* compiled from: java-style lambda group */
2021-07-28 07:39:21 +00:00
public static final class a implements View.OnClickListener {
2021-12-02 18:53:44 +00:00
public final /* synthetic */ int j;
public final /* synthetic */ Object k;
2021-07-24 02:37:17 +00:00
2021-07-28 07:39:21 +00:00
public a(int i, Object obj) {
2021-12-02 18:53:44 +00:00
this.j = i;
this.k = obj;
2021-07-24 02:37:17 +00:00
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
2021-12-02 18:53:44 +00:00
int i = this.j;
2021-07-24 02:37:17 +00:00
if (i == 0) {
2021-12-17 21:59:34 +00:00
((c) this.k).dismiss();
2021-07-24 02:37:17 +00:00
} else if (i == 1) {
2022-02-01 08:01:17 +00:00
c cVar = (c) this.k;
KProperty[] kPropertyArr = c.j;
Objects.requireNonNull(cVar);
WidgetSettingsPremium.Companion companion = WidgetSettingsPremium.Companion;
Context requireContext = cVar.requireContext();
m.checkNotNullExpressionValue(requireContext, "requireContext()");
WidgetSettingsPremium.Companion.launch$default(companion, requireContext, null, null, 6, null);
cVar.dismiss();
2021-07-24 02:37:17 +00:00
} else {
throw null;
}
}
}
2022-02-01 08:01:17 +00:00
/* compiled from: SingleValuePropPremiumUpsellDialog.kt */
2021-12-17 21:59:34 +00:00
public static final class b {
public b(DefaultConstructorMarker defaultConstructorMarker) {
2021-07-24 02:37:17 +00:00
}
2022-02-01 08:01:17 +00:00
public final void a(FragmentManager fragmentManager, AnalyticsTracker.PremiumUpsellType premiumUpsellType, @DrawableRes int i, String str, String str2, String str3, String str4, String str5) {
2021-07-24 02:37:17 +00:00
m.checkNotNullParameter(fragmentManager, "fragmentManager");
2022-02-01 08:01:17 +00:00
m.checkNotNullParameter(premiumUpsellType, "premiumUpsellType");
2021-12-17 21:59:34 +00:00
c cVar = new c();
2021-07-24 02:37:17 +00:00
Bundle bundle = new Bundle();
2022-02-01 08:01:17 +00:00
bundle.putInt("extra_image_drawable_res", i);
bundle.putString("extra_header_text", str);
bundle.putString("extra_body_text", str2);
2021-12-17 21:59:34 +00:00
cVar.setArguments(bundle);
cVar.show(fragmentManager, c.class.getName());
2022-02-01 08:01:17 +00:00
AnalyticsTracker.premiumUpsellViewed$default(AnalyticsTracker.INSTANCE, premiumUpsellType, null, null, new Traits.Source(str3, str4, str5, null, null, 24, null), 6, null);
2021-07-24 02:37:17 +00:00
}
}
2022-02-01 08:01:17 +00:00
/* compiled from: SingleValuePropPremiumUpsellDialog.kt */
2021-12-17 21:59:34 +00:00
/* renamed from: b.a.a.b.c$c reason: collision with other inner class name */
2022-02-01 08:01:17 +00:00
public static final /* synthetic */ class C0009c extends k implements Function1<View, n1> {
public static final C0009c j = new C0009c();
2021-07-24 02:37:17 +00:00
2022-02-01 08:01:17 +00:00
public C0009c() {
super(1, n1.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
2022-02-01 08:01:17 +00:00
public n1 invoke(View view) {
2021-07-24 02:37:17 +00:00
View view2 = view;
m.checkNotNullParameter(view2, "p1");
2022-02-01 08:01:17 +00:00
int i = R.id.button_container;
LinearLayout linearLayout = (LinearLayout) view2.findViewById(R.id.button_container);
2021-07-24 02:37:17 +00:00
if (linearLayout != null) {
2022-02-01 08:01:17 +00:00
i = R.id.close_button;
MaterialButton materialButton = (MaterialButton) view2.findViewById(R.id.close_button);
2021-07-24 02:37:17 +00:00
if (materialButton != null) {
2022-02-01 08:01:17 +00:00
i = R.id.content_background;
View findViewById = view2.findViewById(R.id.content_background);
2021-07-24 02:37:17 +00:00
if (findViewById != null) {
2022-02-01 08:01:17 +00:00
i = R.id.get_premium_button;
ShinyButton shinyButton = (ShinyButton) view2.findViewById(R.id.get_premium_button);
if (shinyButton != null) {
i = R.id.transparent_space;
View findViewById2 = view2.findViewById(R.id.transparent_space);
if (findViewById2 != null) {
i = R.id.upsell_body_text;
TextView textView = (TextView) view2.findViewById(R.id.upsell_body_text);
if (textView != null) {
i = R.id.upsell_header_text;
TextView textView2 = (TextView) view2.findViewById(R.id.upsell_header_text);
if (textView2 != null) {
i = R.id.value_prop_image;
ImageView imageView = (ImageView) view2.findViewById(R.id.value_prop_image);
if (imageView != null) {
return new n1((LinearLayout) view2, linearLayout, materialButton, findViewById, shinyButton, findViewById2, textView, textView2, imageView);
}
2021-07-24 02:37:17 +00:00
}
}
}
}
}
}
}
2021-12-02 18:53:44 +00:00
throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i)));
2021-07-24 02:37:17 +00:00
}
}
2021-12-17 21:59:34 +00:00
public c() {
2022-02-01 08:01:17 +00:00
super(R.layout.single_value_prop_premium_upsell_dialog);
2021-07-24 02:37:17 +00:00
}
2022-02-01 08:01:17 +00:00
public final n1 g() {
return (n1) this.l.getValue((Fragment) this, j[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);
2022-02-01 08:01:17 +00:00
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().f162b.setOnClickListener(new a(0, this));
g().c.setOnClickListener(new a(1, this));
2021-07-24 02:37:17 +00:00
}
}