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

204 lines
9.2 KiB
Java
Raw Normal View History

2021-12-17 22:01:24 +00:00
package b.a.a.b;
2021-07-24 02:37:17 +00:00
2022-02-10 03:01:51 +00:00
import android.content.Context;
import android.os.Bundle;
2021-07-24 02:37:17 +00:00
import android.view.View;
import android.widget.ImageView;
2022-02-10 03:01:51 +00:00
import android.widget.RelativeLayout;
2021-07-24 02:37:17 +00:00
import android.widget.TextView;
import androidx.fragment.app.Fragment;
2022-02-10 03:01:51 +00:00
import androidx.fragment.app.FragmentManager;
import b.a.i.u;
import com.discord.R;
2021-07-24 02:37:17 +00:00
import com.discord.app.AppDialog;
2022-02-10 03:01:51 +00:00
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.analytics.Traits;
2021-07-24 02:37:17 +00:00
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
2022-02-10 03:01:51 +00:00
import com.discord.widgets.servers.guildboost.WidgetGuildBoost;
2021-07-24 02:37:17 +00:00
import com.google.android.material.button.MaterialButton;
2021-11-01 07:19:03 +00:00
import d0.z.d.k;
import d0.z.d.m;
2021-07-24 02:37:17 +00:00
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.reflect.KProperty;
2022-02-10 03:01:51 +00:00
/* compiled from: GuildBoostUpsellDialog.kt */
2022-03-01 22:12:19 +00:00
/* loaded from: classes.dex */
2021-07-28 07:39:21 +00:00
public final class e extends AppDialog {
2022-02-10 03:01:51 +00:00
public static final /* synthetic */ KProperty[] j = {b.d.b.a.a.b0(e.class, "binding", "getBinding()Lcom/discord/databinding/GuildBoostUpsellDialogBinding;", 0)};
2021-12-17 22:01:24 +00:00
public static final b k = new b(null);
2022-02-10 03:01:51 +00:00
public final FragmentViewBindingDelegate l = FragmentViewBindingDelegateKt.viewBinding$default(this, c.j, null, 2, null);
2021-07-24 02:37:17 +00:00
/* compiled from: java-style lambda group */
2022-03-07 09:36:12 +00:00
/* loaded from: classes2.dex */
2021-07-24 02:37:17 +00:00
public static final class a implements View.OnClickListener {
2021-12-17 22:01:24 +00:00
public final /* synthetic */ int j;
2022-02-10 03:01:51 +00:00
public final /* synthetic */ long k;
public final /* synthetic */ Object l;
public final /* synthetic */ Object m;
public final /* synthetic */ Object n;
public final /* synthetic */ Object o;
2021-07-24 02:37:17 +00:00
2022-02-10 03:01:51 +00:00
public a(int i, long j, Object obj, Object obj2, Object obj3, Object obj4) {
2021-12-17 22:01:24 +00:00
this.j = i;
2022-02-10 03:01:51 +00:00
this.k = j;
this.l = obj;
this.m = obj2;
this.n = obj3;
this.o = obj4;
2021-07-24 02:37:17 +00:00
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
2021-12-17 22:01:24 +00:00
int i = this.j;
2021-07-24 02:37:17 +00:00
if (i == 0) {
2022-02-10 03:01:51 +00:00
AnalyticsTracker.INSTANCE.guildBoostPromotionOpened(this.k, new Traits.Location((String) this.n, Traits.Location.Section.PREMIUM_GUILD_UPSELL_MODAL, Traits.Location.Obj.BUTTON_CTA, (String) this.o, null, 16, null), (Long) this.m);
WidgetGuildBoost.Companion companion = WidgetGuildBoost.Companion;
Context requireContext = ((e) this.l).requireContext();
m.checkNotNullExpressionValue(requireContext, "requireContext()");
companion.create(requireContext, this.k);
((e) this.l).dismiss();
2021-07-24 02:37:17 +00:00
} else if (i == 1) {
2022-02-10 03:01:51 +00:00
AnalyticsTracker.INSTANCE.guildBoostPromotionClosed(this.k, new Traits.Location((String) this.n, Traits.Location.Section.PREMIUM_GUILD_UPSELL_MODAL, Traits.Location.Obj.BUTTON_CTA, (String) this.o, null, 16, null), (Long) this.m);
((e) this.l).dismiss();
} else if (i == 2) {
AnalyticsTracker.INSTANCE.guildBoostPromotionClosed(this.k, new Traits.Location((String) this.n, Traits.Location.Section.PREMIUM_GUILD_UPSELL_MODAL, Traits.Location.Obj.BUTTON_CTA, (String) this.o, null, 16, null), (Long) this.m);
((e) this.l).dismiss();
2021-07-24 02:37:17 +00:00
} else {
throw null;
}
}
}
2022-02-10 03:01:51 +00:00
/* compiled from: GuildBoostUpsellDialog.kt */
2022-03-01 22:12:19 +00:00
/* loaded from: classes.dex */
2021-07-24 02:37:17 +00:00
public static final class b {
public b(DefaultConstructorMarker defaultConstructorMarker) {
}
2022-02-10 03:01:51 +00:00
2022-03-01 22:12:19 +00:00
/* JADX WARN: Removed duplicated region for block: B:19:0x0041 */
/* JADX WARN: Removed duplicated region for block: B:21:0x004c */
/* JADX WARN: Removed duplicated region for block: B:28:0x0076 */
/* JADX WARN: Removed duplicated region for block: B:29:0x007c */
/* JADX WARN: Removed duplicated region for block: B:31:0x007f */
/* JADX WARN: Removed duplicated region for block: B:32:0x0085 */
/* JADX WARN: Removed duplicated region for block: B:34:0x0088 */
/*
Code decompiled incorrectly, please refer to instructions dump.
*/
2022-02-10 03:01:51 +00:00
public final void a(FragmentManager fragmentManager, long j, Long l, Integer num, Traits.Location location) {
String str;
Bundle I;
String page;
m.checkNotNullParameter(fragmentManager, "fragmentManager");
e eVar = new e();
2022-03-01 22:12:19 +00:00
String str2 = null;
2022-02-10 03:01:51 +00:00
if (num != null && num.intValue() == 1) {
2022-03-01 22:12:19 +00:00
str = Traits.Location.ObjType.TIER_1;
2022-02-10 03:01:51 +00:00
} else if (num != null && num.intValue() == 2) {
2022-03-01 22:12:19 +00:00
str = Traits.Location.ObjType.TIER_2;
2022-02-10 03:01:51 +00:00
} else if (num != null && num.intValue() == 3) {
2022-03-01 22:12:19 +00:00
str = Traits.Location.ObjType.TIER_3;
2022-02-10 03:01:51 +00:00
} else {
str = null;
I = b.d.b.a.a.I("extra_guild_id", j);
if (l != null) {
I.putLong("extra_channel_id", l.longValue());
}
if (str != null) {
I.putString("extra_object_type", str);
}
if (!(location == null || (page = location.getPage()) == null)) {
I.putString("extra_page", page);
}
eVar.setArguments(I);
eVar.show(fragmentManager, e.class.getSimpleName());
AnalyticsTracker analyticsTracker = AnalyticsTracker.INSTANCE;
String v = b.d.b.a.a.v("Premium Guild Upsell Modal - Tier ", str);
String page2 = location == null ? location.getPage() : null;
2022-03-01 22:12:19 +00:00
String str3 = location == null ? location.get_object() : null;
2022-02-10 03:01:51 +00:00
if (location != null) {
2022-03-01 22:12:19 +00:00
str2 = location.getSection();
2022-02-10 03:01:51 +00:00
}
2022-03-01 22:12:19 +00:00
analyticsTracker.openModal(v, new Traits.Location(page2, str2, str3, str, null, 16, null));
2022-02-10 03:01:51 +00:00
}
I = b.d.b.a.a.I("extra_guild_id", j);
if (l != null) {
}
if (str != null) {
}
2022-03-01 22:12:19 +00:00
if (location == null) {
I.putString("extra_page", page);
}
2022-02-10 03:01:51 +00:00
eVar.setArguments(I);
eVar.show(fragmentManager, e.class.getSimpleName());
2022-03-01 22:12:19 +00:00
AnalyticsTracker analyticsTracker2 = AnalyticsTracker.INSTANCE;
String v2 = b.d.b.a.a.v("Premium Guild Upsell Modal - Tier ", str);
2022-02-10 03:01:51 +00:00
if (location == null) {
}
if (location == null) {
}
if (location != null) {
}
2022-03-01 22:12:19 +00:00
analyticsTracker2.openModal(v2, new Traits.Location(page2, str2, str3, str, null, 16, null));
2022-02-10 03:01:51 +00:00
}
2021-07-24 02:37:17 +00:00
}
2022-02-10 03:01:51 +00:00
/* compiled from: GuildBoostUpsellDialog.kt */
2022-03-01 22:12:19 +00:00
/* loaded from: classes.dex */
2022-02-10 03:01:51 +00:00
public static final /* synthetic */ class c extends k implements Function1<View, u> {
2021-12-17 22:01:24 +00:00
public static final c j = new c();
2021-07-24 02:37:17 +00:00
public c() {
2022-02-10 03:01:51 +00:00
super(1, u.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/GuildBoostUpsellDialogBinding;", 0);
2021-07-24 02:37:17 +00:00
}
@Override // kotlin.jvm.functions.Function1
2022-02-10 03:01:51 +00:00
public u invoke(View view) {
2021-07-24 02:37:17 +00:00
View view2 = view;
m.checkNotNullParameter(view2, "p1");
2022-02-10 03:01:51 +00:00
int i = R.id.guild_boost_upsell_close;
ImageView imageView = (ImageView) view2.findViewById(R.id.guild_boost_upsell_close);
2021-07-24 02:37:17 +00:00
if (imageView != null) {
2022-02-10 03:01:51 +00:00
i = R.id.guild_boost_upsell_close_button;
TextView textView = (TextView) view2.findViewById(R.id.guild_boost_upsell_close_button);
2021-07-24 02:37:17 +00:00
if (textView != null) {
2022-02-10 03:01:51 +00:00
i = R.id.guild_boost_upsell_subscribe_button;
MaterialButton materialButton = (MaterialButton) view2.findViewById(R.id.guild_boost_upsell_subscribe_button);
if (materialButton != null) {
return new u((RelativeLayout) view2, imageView, textView, materialButton);
2021-07-24 02:37:17 +00:00
}
}
}
2021-12-17 22:01:24 +00:00
throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i)));
2021-07-24 02:37:17 +00:00
}
}
2021-07-28 07:39:21 +00:00
public e() {
2022-02-10 03:01:51 +00:00
super(R.layout.guild_boost_upsell_dialog);
2021-07-24 02:37:17 +00:00
}
2022-02-10 03:01:51 +00:00
public final u g() {
return (u) this.l.getValue((Fragment) this, j[0]);
2021-07-24 02:37:17 +00:00
}
@Override // com.discord.app.AppDialog
2022-02-10 03:01:51 +00:00
public void onViewBound(View view) {
m.checkNotNullParameter(view, "view");
super.onViewBound(view);
2022-03-01 22:12:19 +00:00
long j2 = getArgumentsOrDefault().getLong("extra_guild_id", -1L);
2022-02-10 03:01:51 +00:00
Bundle arguments = getArguments();
String str = null;
Long valueOf = arguments != null ? Long.valueOf(arguments.getLong("extra_channel_id")) : null;
Bundle arguments2 = getArguments();
String string = arguments2 != null ? arguments2.getString("extra_object_type") : null;
Bundle arguments3 = getArguments();
if (arguments3 != null) {
str = arguments3.getString("extra_page");
2021-07-24 02:37:17 +00:00
}
2022-02-10 03:01:51 +00:00
g().d.setOnClickListener(new a(0, j2, this, valueOf, str, string));
g().f204b.setOnClickListener(new a(1, j2, this, valueOf, str, string));
g().c.setOnClickListener(new a(2, j2, this, valueOf, str, string));
2021-07-24 02:37:17 +00:00
}
}