2021-12-21 23:37:30 +00:00
|
|
|
package b.a.a.b;
|
2021-08-04 22:02:59 +00:00
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.view.View;
|
|
|
|
import android.widget.ImageView;
|
|
|
|
import android.widget.RelativeLayout;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
import androidx.fragment.app.FragmentManager;
|
2021-12-21 23:37:30 +00:00
|
|
|
import b.a.i.u;
|
2021-08-09 22:50:01 +00:00
|
|
|
import com.discord.R;
|
2021-08-04 22:02:59 +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;
|
2021-12-21 23:37:30 +00:00
|
|
|
import com.discord.widgets.servers.guildboost.WidgetGuildBoost;
|
2021-08-04 22:02:59 +00:00
|
|
|
import com.google.android.material.button.MaterialButton;
|
2021-11-08 18:25:28 +00:00
|
|
|
import d0.z.d.k;
|
|
|
|
import d0.z.d.m;
|
2021-08-04 22:02:59 +00:00
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
import kotlin.reflect.KProperty;
|
2021-12-21 23:37:30 +00:00
|
|
|
/* compiled from: GuildBoostUpsellDialog.kt */
|
|
|
|
public final class b extends AppDialog {
|
|
|
|
public static final /* synthetic */ KProperty[] j = {b.d.b.a.a.b0(b.class, "binding", "getBinding()Lcom/discord/databinding/GuildBoostUpsellDialogBinding;", 0)};
|
|
|
|
public static final C0007b k = new C0007b(null);
|
2021-12-17 22:03:14 +00:00
|
|
|
public final FragmentViewBindingDelegate l = FragmentViewBindingDelegateKt.viewBinding$default(this, c.j, null, 2, null);
|
2021-08-04 22:02:59 +00:00
|
|
|
|
|
|
|
/* compiled from: java-style lambda group */
|
2021-12-21 23:37:30 +00:00
|
|
|
public static final class a implements View.OnClickListener {
|
2021-12-17 22:03:14 +00:00
|
|
|
public final /* synthetic */ int j;
|
|
|
|
public final /* synthetic */ Object k;
|
2021-08-04 22:02:59 +00:00
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
public a(int i, Object obj) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.j = i;
|
|
|
|
this.k = obj;
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
|
|
public final void onClick(View view) {
|
2021-12-17 22:03:14 +00:00
|
|
|
int i = this.j;
|
2021-08-04 22:02:59 +00:00
|
|
|
if (i == 0) {
|
2021-12-21 23:37:30 +00:00
|
|
|
((b) this.k).dismiss();
|
2021-08-04 22:02:59 +00:00
|
|
|
} else if (i == 1) {
|
2021-12-21 23:37:30 +00:00
|
|
|
((b) this.k).dismiss();
|
2021-08-04 22:02:59 +00:00
|
|
|
} else {
|
|
|
|
throw null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
/* compiled from: GuildBoostUpsellDialog.kt */
|
|
|
|
/* renamed from: b.a.a.b.b$b reason: collision with other inner class name */
|
|
|
|
public static final class C0007b {
|
|
|
|
public C0007b(DefaultConstructorMarker defaultConstructorMarker) {
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
|
|
|
|
2021-09-14 19:31:33 +00:00
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:17:0x0041 */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:19:0x004c */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:26:0x0076 */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:27:0x007c */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:29:0x007f */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:30:0x0085 */
|
|
|
|
/* JADX WARNING: Removed duplicated region for block: B:32:0x0088 */
|
2021-08-04 22:02:59 +00:00
|
|
|
public final void a(FragmentManager fragmentManager, long j, Long l, Integer num, Traits.Location location) {
|
|
|
|
String str;
|
2021-09-14 19:31:33 +00:00
|
|
|
Bundle I;
|
2021-08-04 22:02:59 +00:00
|
|
|
String page;
|
|
|
|
String str2;
|
|
|
|
m.checkNotNullParameter(fragmentManager, "fragmentManager");
|
2021-12-21 23:37:30 +00:00
|
|
|
b bVar = new b();
|
2021-08-04 22:02:59 +00:00
|
|
|
String str3 = null;
|
|
|
|
if (num != null && num.intValue() == 1) {
|
2021-08-09 22:50:01 +00:00
|
|
|
str2 = Traits.Location.ObjType.TIER_1;
|
2021-08-04 22:02:59 +00:00
|
|
|
} else if (num != null && num.intValue() == 2) {
|
2021-08-09 22:50:01 +00:00
|
|
|
str2 = Traits.Location.ObjType.TIER_2;
|
2021-08-04 22:02:59 +00:00
|
|
|
} else if (num != null && num.intValue() == 3) {
|
2021-08-09 22:50:01 +00:00
|
|
|
str2 = Traits.Location.ObjType.TIER_3;
|
2021-08-04 22:02:59 +00:00
|
|
|
} else {
|
|
|
|
str = null;
|
2021-12-21 23:37:30 +00:00
|
|
|
I = b.d.b.a.a.I("extra_guild_id", j);
|
2021-08-04 22:02:59 +00:00
|
|
|
if (l != null) {
|
2021-09-14 19:31:33 +00:00
|
|
|
I.putLong("extra_channel_id", l.longValue());
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
|
|
|
if (str != null) {
|
2021-09-14 19:31:33 +00:00
|
|
|
I.putString("extra_object_type", str);
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
|
|
|
if (!(location == null || (page = location.getPage()) == null)) {
|
2021-09-14 19:31:33 +00:00
|
|
|
I.putString("extra_page", page);
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
2021-12-21 23:37:30 +00:00
|
|
|
bVar.setArguments(I);
|
|
|
|
bVar.show(fragmentManager, b.class.getSimpleName());
|
2021-08-04 22:02:59 +00:00
|
|
|
AnalyticsTracker analyticsTracker = AnalyticsTracker.INSTANCE;
|
2021-12-21 23:37:30 +00:00
|
|
|
String v = b.d.b.a.a.v("Premium Guild Upsell Modal - Tier ", str);
|
2021-08-04 22:02:59 +00:00
|
|
|
String page2 = location == null ? location.getPage() : null;
|
|
|
|
String str4 = location == null ? location.get_object() : null;
|
|
|
|
if (location != null) {
|
|
|
|
str3 = location.getSection();
|
|
|
|
}
|
2021-11-08 18:25:28 +00:00
|
|
|
analyticsTracker.openModal(v, new Traits.Location(page2, str3, str4, str, null, 16, null));
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
|
|
|
str = str2;
|
2021-12-21 23:37:30 +00:00
|
|
|
I = b.d.b.a.a.I("extra_guild_id", j);
|
2021-08-04 22:02:59 +00:00
|
|
|
if (l != null) {
|
|
|
|
}
|
|
|
|
if (str != null) {
|
|
|
|
}
|
2021-09-14 19:31:33 +00:00
|
|
|
I.putString("extra_page", page);
|
2021-12-21 23:37:30 +00:00
|
|
|
bVar.setArguments(I);
|
|
|
|
bVar.show(fragmentManager, b.class.getSimpleName());
|
2021-08-04 22:02:59 +00:00
|
|
|
AnalyticsTracker analyticsTracker = AnalyticsTracker.INSTANCE;
|
2021-12-21 23:37:30 +00:00
|
|
|
String v = b.d.b.a.a.v("Premium Guild Upsell Modal - Tier ", str);
|
2021-08-04 22:02:59 +00:00
|
|
|
if (location == null) {
|
|
|
|
}
|
|
|
|
if (location == null) {
|
|
|
|
}
|
|
|
|
if (location != null) {
|
|
|
|
}
|
2021-11-08 18:25:28 +00:00
|
|
|
analyticsTracker.openModal(v, new Traits.Location(page2, str3, str4, str, null, 16, null));
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
/* compiled from: GuildBoostUpsellDialog.kt */
|
|
|
|
public static final /* synthetic */ class c extends k implements Function1<View, u> {
|
2021-12-17 22:03:14 +00:00
|
|
|
public static final c j = new c();
|
2021-08-04 22:02:59 +00:00
|
|
|
|
|
|
|
public c() {
|
2021-12-21 23:37:30 +00:00
|
|
|
super(1, u.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/GuildBoostUpsellDialogBinding;", 0);
|
2021-08-04 22:02:59 +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-12-21 23:37:30 +00:00
|
|
|
public u invoke(View view) {
|
2021-08-04 22:02:59 +00:00
|
|
|
View view2 = view;
|
|
|
|
m.checkNotNullParameter(view2, "p1");
|
2021-12-21 23:37:30 +00:00
|
|
|
int i = R.id.guild_boost_upsell_close;
|
|
|
|
ImageView imageView = (ImageView) view2.findViewById(R.id.guild_boost_upsell_close);
|
2021-08-04 22:02:59 +00:00
|
|
|
if (imageView != null) {
|
2021-12-21 23:37:30 +00:00
|
|
|
i = R.id.guild_boost_upsell_close_button;
|
|
|
|
TextView textView = (TextView) view2.findViewById(R.id.guild_boost_upsell_close_button);
|
2021-08-04 22:02:59 +00:00
|
|
|
if (textView != null) {
|
2021-12-21 23:37:30 +00:00
|
|
|
i = R.id.guild_boost_upsell_subscribe_button;
|
|
|
|
MaterialButton materialButton = (MaterialButton) view2.findViewById(R.id.guild_boost_upsell_subscribe_button);
|
2021-08-04 22:02:59 +00:00
|
|
|
if (materialButton != null) {
|
2021-12-21 23:37:30 +00:00
|
|
|
return new u((RelativeLayout) view2, imageView, textView, materialButton);
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-12-17 22:03:14 +00:00
|
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i)));
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
/* compiled from: GuildBoostUpsellDialog.kt */
|
2021-08-04 22:02:59 +00:00
|
|
|
public static final class d implements View.OnClickListener {
|
2021-12-21 23:37:30 +00:00
|
|
|
public final /* synthetic */ b j;
|
2021-12-17 22:03:14 +00:00
|
|
|
public final /* synthetic */ long k;
|
|
|
|
public final /* synthetic */ Long l;
|
2021-08-04 22:02:59 +00:00
|
|
|
public final /* synthetic */ String m;
|
2021-12-17 22:03:14 +00:00
|
|
|
public final /* synthetic */ String n;
|
2021-08-04 22:02:59 +00:00
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
public d(b bVar, long j, Long l, String str, String str2) {
|
|
|
|
this.j = bVar;
|
2021-12-17 22:03:14 +00:00
|
|
|
this.k = j;
|
|
|
|
this.l = l;
|
|
|
|
this.m = str;
|
|
|
|
this.n = str2;
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
|
|
public final void onClick(View view) {
|
2021-12-21 23:37:30 +00:00
|
|
|
AnalyticsTracker.INSTANCE.guildBoostPromotionOpened(this.k, new Traits.Location(this.m, Traits.Location.Section.PREMIUM_GUILD_UPSELL_MODAL, Traits.Location.Obj.BUTTON_CTA, this.n, null, 16, null), this.l);
|
|
|
|
WidgetGuildBoost.Companion companion = WidgetGuildBoost.Companion;
|
2021-12-17 22:03:14 +00:00
|
|
|
Context requireContext = this.j.requireContext();
|
2021-08-04 22:02:59 +00:00
|
|
|
m.checkNotNullExpressionValue(requireContext, "requireContext()");
|
2021-12-17 22:03:14 +00:00
|
|
|
companion.create(requireContext, this.k);
|
|
|
|
this.j.dismiss();
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
public b() {
|
|
|
|
super(R.layout.guild_boost_upsell_dialog);
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
public final u g() {
|
|
|
|
return (u) this.l.getValue((Fragment) this, j[0]);
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppDialog
|
|
|
|
public void onViewBound(View view) {
|
|
|
|
m.checkNotNullParameter(view, "view");
|
|
|
|
super.onViewBound(view);
|
|
|
|
long j2 = getArgumentsOrDefault().getLong("extra_guild_id", -1);
|
|
|
|
Bundle arguments = getArguments();
|
|
|
|
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();
|
|
|
|
g().d.setOnClickListener(new d(this, j2, valueOf, arguments3 != null ? arguments3.getString("extra_page") : null, string));
|
2022-02-01 19:18:35 +00:00
|
|
|
g().f203b.setOnClickListener(new a(0, this));
|
2021-12-21 23:37:30 +00:00
|
|
|
g().c.setOnClickListener(new a(1, this));
|
2021-08-04 22:02:59 +00:00
|
|
|
}
|
|
|
|
}
|