2021-12-17 21:59:34 +00:00
|
|
|
package b.a.a.a;
|
2021-07-24 02:37:17 +00:00
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.DialogInterface;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.view.View;
|
|
|
|
import android.widget.LinearLayout;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
import androidx.fragment.app.FragmentManager;
|
2021-12-17 21:59:34 +00:00
|
|
|
import b.a.i.q;
|
2021-07-24 02:37:17 +00:00
|
|
|
import com.airbnb.lottie.LottieAnimationView;
|
2021-08-09 22:51:56 +00:00
|
|
|
import com.discord.R;
|
2021-07-24 02:37:17 +00:00
|
|
|
import com.discord.app.AppDialog;
|
|
|
|
import com.discord.utilities.animations.LottieAnimationUtilsKt;
|
|
|
|
import com.discord.utilities.resources.StringResourceUtilsKt;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
|
|
|
|
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 kotlin.Unit;
|
|
|
|
import kotlin.jvm.functions.Function0;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
import kotlin.ranges.IntRange;
|
|
|
|
import kotlin.reflect.KProperty;
|
2021-12-17 21:59:34 +00:00
|
|
|
/* compiled from: GuildBoostActivatedDialog.kt */
|
2022-03-07 09:34:54 +00:00
|
|
|
/* loaded from: classes.dex */
|
2021-07-24 02:37:17 +00:00
|
|
|
public final class c extends AppDialog {
|
2021-12-02 18:53:44 +00:00
|
|
|
public final FragmentViewBindingDelegate m = FragmentViewBindingDelegateKt.viewBinding$default(this, b.j, null, 2, null);
|
|
|
|
public Function0<Unit> n;
|
2022-03-07 09:34:54 +00:00
|
|
|
public static final /* synthetic */ KProperty[] j = {b.d.b.a.a.b0(c.class, "binding", "getBinding()Lcom/discord/databinding/GuildBoostActivatedDialogBinding;", 0)};
|
|
|
|
public static final a l = new a(null);
|
|
|
|
public static final IntRange k = new IntRange(540, 825);
|
2021-07-24 02:37:17 +00:00
|
|
|
|
2021-12-17 21:59:34 +00:00
|
|
|
/* compiled from: GuildBoostActivatedDialog.kt */
|
2022-03-07 09:34:54 +00:00
|
|
|
/* loaded from: classes.dex */
|
2021-07-24 02:37:17 +00:00
|
|
|
public static final class a {
|
|
|
|
public a(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void a(FragmentManager fragmentManager, Context context, String str, int i, boolean z2, Function0<Unit> function0) {
|
|
|
|
m.checkNotNullParameter(fragmentManager, "fragmentManager");
|
|
|
|
m.checkNotNullParameter(context, "context");
|
|
|
|
m.checkNotNullParameter(function0, "dismissListener");
|
2021-12-17 21:59:34 +00:00
|
|
|
CharSequence h = z2 ? b.a.k.b.h(context, R.string.guild_subscription_purchase_modal_transferred_description_mobile1, new Object[0], null, 4) : b.a.k.b.h(context, R.string.guild_subscription_purchase_modal_activated_description_mobile1, new Object[0], null, 4);
|
|
|
|
CharSequence h2 = str == null ? b.a.k.b.h(context, R.string.guild_subscription_purchase_modal_activated_description_no_application, new Object[]{StringResourceUtilsKt.getI18nPluralString(context, R.plurals.guild_subscription_purchase_modal_activated_description_no_application_guildSubscriptionQuantity, i, Integer.valueOf(i))}, null, 4) : z2 ? b.a.k.b.h(context, R.string.guild_subscription_purchase_modal_transferred_description_mobile2, new Object[]{str, StringResourceUtilsKt.getI18nPluralString(context, R.plurals.guild_subscription_purchase_modal_transferred_description_mobile2_guildSubscriptionQuantity, i, Integer.valueOf(i))}, null, 4) : b.a.k.b.h(context, R.string.guild_subscription_purchase_modal_activated_description_mobile2, new Object[]{str, StringResourceUtilsKt.getI18nPluralString(context, R.plurals.guild_subscription_purchase_modal_activated_description_guildSubscriptionQuantity, i, Integer.valueOf(i))}, null, 4);
|
2021-07-24 02:37:17 +00:00
|
|
|
c cVar = new c();
|
2021-12-02 18:53:44 +00:00
|
|
|
cVar.n = function0;
|
2021-07-24 02:37:17 +00:00
|
|
|
Bundle bundle = new Bundle();
|
2021-08-03 07:33:18 +00:00
|
|
|
bundle.putCharSequence("extra_body1_text", h);
|
|
|
|
bundle.putCharSequence("extra_body2_text", h2);
|
2021-07-24 02:37:17 +00:00
|
|
|
cVar.setArguments(bundle);
|
|
|
|
cVar.show(fragmentManager, c.class.getName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-17 21:59:34 +00:00
|
|
|
/* compiled from: GuildBoostActivatedDialog.kt */
|
2022-03-07 09:34:54 +00:00
|
|
|
/* loaded from: classes.dex */
|
2021-12-17 21:59:34 +00:00
|
|
|
public static final /* synthetic */ class b extends k implements Function1<View, q> {
|
2021-12-02 18:53:44 +00:00
|
|
|
public static final b j = new b();
|
2021-07-24 02:37:17 +00:00
|
|
|
|
|
|
|
public b() {
|
2021-12-17 21:59:34 +00:00
|
|
|
super(1, q.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/GuildBoostActivatedDialogBinding;", 0);
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // kotlin.jvm.functions.Function1
|
2021-12-17 21:59:34 +00:00
|
|
|
public q invoke(View view) {
|
2021-07-24 02:37:17 +00:00
|
|
|
View view2 = view;
|
|
|
|
m.checkNotNullParameter(view2, "p1");
|
2021-12-17 21:59:34 +00:00
|
|
|
int i = R.id.guild_boost_activated_body_1;
|
|
|
|
TextView textView = (TextView) view2.findViewById(R.id.guild_boost_activated_body_1);
|
2021-07-24 02:37:17 +00:00
|
|
|
if (textView != null) {
|
2021-12-17 21:59:34 +00:00
|
|
|
i = R.id.guild_boost_activated_body_2;
|
|
|
|
TextView textView2 = (TextView) view2.findViewById(R.id.guild_boost_activated_body_2);
|
2021-07-24 02:37:17 +00:00
|
|
|
if (textView2 != null) {
|
2021-12-17 21:59:34 +00:00
|
|
|
i = R.id.guild_boost_activated_lottie;
|
|
|
|
LottieAnimationView lottieAnimationView = (LottieAnimationView) view2.findViewById(R.id.guild_boost_activated_lottie);
|
2021-07-24 02:37:17 +00:00
|
|
|
if (lottieAnimationView != null) {
|
2021-12-17 21:59:34 +00:00
|
|
|
i = R.id.guild_boost_activated_ok;
|
|
|
|
MaterialButton materialButton = (MaterialButton) view2.findViewById(R.id.guild_boost_activated_ok);
|
2021-07-24 02:37:17 +00:00
|
|
|
if (materialButton != null) {
|
2021-12-17 21:59:34 +00:00
|
|
|
return new q((LinearLayout) view2, textView, textView2, lottieAnimationView, materialButton);
|
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
|
|
|
/* compiled from: GuildBoostActivatedDialog.kt */
|
|
|
|
/* renamed from: b.a.a.a.c$c reason: collision with other inner class name */
|
2022-03-07 09:34:54 +00:00
|
|
|
/* loaded from: classes.dex */
|
|
|
|
public static final class View$OnClickListenerC0009c implements View.OnClickListener {
|
|
|
|
public View$OnClickListenerC0009c() {
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
|
|
public final void onClick(View view) {
|
2022-03-07 09:34:54 +00:00
|
|
|
c.this.dismiss();
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public c() {
|
2021-12-17 21:59:34 +00:00
|
|
|
super(R.layout.guild_boost_activated_dialog);
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
|
2021-12-17 21:59:34 +00:00
|
|
|
public final q g() {
|
|
|
|
return (q) this.m.getValue((Fragment) this, j[0]);
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // androidx.fragment.app.DialogFragment, android.content.DialogInterface.OnDismissListener
|
|
|
|
public void onDismiss(DialogInterface dialogInterface) {
|
|
|
|
m.checkNotNullParameter(dialogInterface, "dialog");
|
2021-12-02 18:53:44 +00:00
|
|
|
Function0<Unit> function0 = this.n;
|
2021-07-24 02:37:17 +00:00
|
|
|
if (function0 != null) {
|
2022-03-07 09:34:54 +00:00
|
|
|
function0.invoke();
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
super.onDismiss(dialogInterface);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppDialog
|
|
|
|
public void onViewBoundOrOnResume() {
|
|
|
|
super.onViewBoundOrOnResume();
|
2022-03-12 00:35:13 +00:00
|
|
|
TextView textView = g().f180b;
|
2021-12-17 21:59:34 +00:00
|
|
|
m.checkNotNullExpressionValue(textView, "binding.guildBoostActivatedBody1");
|
2021-07-24 02:37:17 +00:00
|
|
|
Bundle arguments = getArguments();
|
|
|
|
CharSequence charSequence = null;
|
|
|
|
textView.setText(arguments != null ? arguments.getCharSequence("extra_body1_text") : null);
|
2021-12-17 21:59:34 +00:00
|
|
|
TextView textView2 = g().c;
|
|
|
|
m.checkNotNullExpressionValue(textView2, "binding.guildBoostActivatedBody2");
|
2021-07-24 02:37:17 +00:00
|
|
|
Bundle arguments2 = getArguments();
|
|
|
|
if (arguments2 != null) {
|
|
|
|
charSequence = arguments2.getCharSequence("extra_body2_text");
|
|
|
|
}
|
|
|
|
textView2.setText(charSequence);
|
2022-03-07 09:34:54 +00:00
|
|
|
g().e.setOnClickListener(new View$OnClickListenerC0009c());
|
2021-07-24 02:37:17 +00:00
|
|
|
LottieAnimationView lottieAnimationView = g().d;
|
2021-12-17 21:59:34 +00:00
|
|
|
m.checkNotNullExpressionValue(lottieAnimationView, "binding.guildBoostActivatedLottie");
|
2022-03-07 09:34:54 +00:00
|
|
|
LottieAnimationUtilsKt.loopFrom$default(lottieAnimationView, 180, k, false, 4, null);
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
}
|