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

104 lines
4.3 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
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
2021-12-17 22:01:24 +00:00
import b.a.i.c1;
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;
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.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.reflect.KProperty;
2021-12-17 22:01:24 +00:00
/* compiled from: PremiumAndGuildBoostActivatedDialog.kt */
2021-07-28 07:39:21 +00:00
public final class g extends AppDialog {
2021-12-17 22:01:24 +00:00
public static final /* synthetic */ KProperty[] j = {b.d.b.a.a.b0(g.class, "binding", "getBinding()Lcom/discord/databinding/PremiumAndGuildBoostActivatedDialogBinding;", 0)};
public static final a k = new a(null);
public Function0<Unit> l;
public final FragmentViewBindingDelegate m = FragmentViewBindingDelegateKt.viewBinding$default(this, b.j, null, 2, null);
2021-07-24 02:37:17 +00:00
2021-12-17 22:01:24 +00:00
/* compiled from: PremiumAndGuildBoostActivatedDialog.kt */
2021-07-24 02:37:17 +00:00
public static final class a {
public a(DefaultConstructorMarker defaultConstructorMarker) {
}
}
2021-12-17 22:01:24 +00:00
/* compiled from: PremiumAndGuildBoostActivatedDialog.kt */
public static final /* synthetic */ class b extends k implements Function1<View, c1> {
public static final b j = new b();
2021-07-24 02:37:17 +00:00
public b() {
2021-12-17 22:01:24 +00:00
super(1, c1.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/PremiumAndGuildBoostActivatedDialogBinding;", 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-12-17 22:01:24 +00:00
public c1 invoke(View view) {
2021-07-24 02:37:17 +00:00
View view2 = view;
m.checkNotNullParameter(view2, "p1");
2021-12-17 22:01:24 +00:00
int i = R.id.premium_activated_confirm;
MaterialButton materialButton = (MaterialButton) view2.findViewById(R.id.premium_activated_confirm);
2021-07-24 02:37:17 +00:00
if (materialButton != null) {
2021-12-17 22:01:24 +00:00
i = R.id.premium_and_guild_boost_activated_text;
TextView textView = (TextView) view2.findViewById(R.id.premium_and_guild_boost_activated_text);
2021-07-24 02:37:17 +00:00
if (textView != null) {
2021-12-17 22:01:24 +00:00
return new c1((LinearLayout) view2, materialButton, textView);
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-12-17 22:01:24 +00:00
/* compiled from: PremiumAndGuildBoostActivatedDialog.kt */
2021-07-24 02:37:17 +00:00
public static final class c implements View.OnClickListener {
2021-12-17 22:01:24 +00:00
public final /* synthetic */ g j;
2021-07-24 02:37:17 +00:00
2021-07-28 07:39:21 +00:00
public c(g gVar) {
2021-12-17 22:01:24 +00:00
this.j = gVar;
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
Function0<Unit> function0 = this.j.l;
2021-07-24 02:37:17 +00:00
if (function0 != null) {
2021-11-01 07:19:03 +00:00
function0.mo1invoke();
2021-07-24 02:37:17 +00:00
}
2021-12-17 22:01:24 +00:00
this.j.dismiss();
2021-07-24 02:37:17 +00:00
}
}
2021-07-28 07:39:21 +00:00
public g() {
2021-12-17 22:01:24 +00:00
super(R.layout.premium_and_guild_boost_activated_dialog);
2021-07-24 02:37:17 +00:00
}
@Override // com.discord.app.AppDialog
public void onViewBoundOrOnResume() {
String str;
super.onViewBoundOrOnResume();
2021-12-17 22:01:24 +00:00
if (this.l == null) {
2021-07-24 02:37:17 +00:00
dismiss();
}
Bundle arguments = getArguments();
if (arguments == null || (str = arguments.getString("extra_plan_text")) == null) {
str = "";
}
m.checkNotNullExpressionValue(str, "arguments?.getString(EXTRA_PLAN_NAME) ?: \"\"");
2021-12-17 22:01:24 +00:00
FragmentViewBindingDelegate fragmentViewBindingDelegate = this.m;
KProperty<?>[] kPropertyArr = j;
TextView textView = ((c1) fragmentViewBindingDelegate.getValue((Fragment) this, kPropertyArr[0])).c;
m.checkNotNullExpressionValue(textView, "binding.premiumAndGuildBoostActivatedText");
b.a.k.b.n(textView, R.string.billing_premium_and_premium_guild_plan_activated, new Object[]{str}, null, 4);
2021-07-24 02:37:17 +00:00
requireDialog().setCanceledOnTouchOutside(true);
2022-01-27 08:54:45 +00:00
((c1) this.m.getValue((Fragment) this, kPropertyArr[0])).f89b.setOnClickListener(new c(this));
2021-07-24 02:37:17 +00:00
}
}