Money Lover v8.14.0.6版本的 MD5 值为:48b9d922212c7ccfd438cdcc183ff396
以下内容为反编译后的 j.java 源代码,内容仅作参考
package x7;
import ak.e6;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.RemoteException;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.widget.Toolbar;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.q;
import com.bookmark.money.R;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.google.firebase.messaging.Constants;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
import com.scorpion.carouselview.CarouselView;
import com.zoostudio.moneylover.adapter.item.PaymentItem;
import com.zoostudio.moneylover.billing.ActivityStoreV2;
import com.zoostudio.moneylover.billing.finsify.StoreLinkedWalletActivity;
import com.zoostudio.moneylover.db.sync.item.g;
import com.zoostudio.moneylover.exception.MoneyError;
import com.zoostudio.moneylover.help.activity.ActivityChatHelp;
import com.zoostudio.moneylover.main.moneyInsider.store.MoneyInsiderStoreActivity;
import com.zoostudio.moneylover.redeemcredits.ActivityRedeemCredits;
import com.zoostudio.moneylover.service.MoneyDownloadService;
import com.zoostudio.moneylover.ui.ActivityEnterCode;
import com.zoostudio.moneylover.ui.ActivityIconPackDetail;
import com.zoostudio.moneylover.ui.activity.ActivityPremiumStore;
import com.zoostudio.moneylover.utils.a1;
import com.zoostudio.moneylover.utils.b1;
import com.zoostudio.moneylover.utils.q0;
import com.zoostudio.moneylover.utils.y;
import com.zoostudio.moneylover.views.ImageViewGlide;
import com.zoostudio.moneylover.views.MLToolbar;
import h3.aa;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import kn.o;
import kn.v;
import kotlin.coroutines.jvm.internal.l;
import kotlin.jvm.internal.r;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import rq.m0;
import rq.w0;
import rt.n;
import wj.i0;
import wj.l0;
import wn.p;
public final class j extends e6 implements View.OnClickListener {
public static final a M = new a(null);
private aa B;
private final BroadcastReceiver C = new c();
private final BroadcastReceiver H = new b();
private final C0672j L = new C0672j();
private Context f38364c;
private CarouselView f38365d;
private View f38366e;
private View f38367f;
private View f38368g;
private View f38369i;
private TextView f38370j;
private TextView f38371o;
private ArrayList<PaymentItem> f38372p;
private com.zoostudio.moneylover.views.h f38373q;
public static final class a {
private a() {
}
public a(kotlin.jvm.internal.j jVar) {
this();
}
}
public static final class b extends BroadcastReceiver {
b() {
}
@Override
public void onReceive(Context context, Intent intent) {
r.h(context, "context");
r.h(intent, "intent");
j.this.J0();
j.this.H0();
j.this.E0();
j.this.I0();
}
}
public static final class c extends BroadcastReceiver {
c() {
}
@Override
public void onReceive(Context context, Intent intent) {
r.h(context, "context");
r.h(intent, "intent");
j.this.J0();
j.this.H0();
j.this.E0();
j.this.I0();
}
}
@kotlin.coroutines.jvm.internal.f(c = "com.zoostudio.moneylover.billing.feature.FragmentStoreFeatureV2$delayClickBudgetPlus$1", f = "FragmentStoreFeatureV2.kt", l = {614}, m = "invokeSuspend")
public static final class d extends l implements p<m0, on.d<? super v>, Object> {
int f38376a;
d(on.d<? super d> dVar) {
super(2, dVar);
}
@Override
public final on.d<v> create(Object obj, on.d<?> dVar) {
return new d(dVar);
}
@Override
public final Object invoke(m0 m0Var, on.d<? super v> dVar) {
return ((d) create(m0Var, dVar)).invokeSuspend(v.f26314a);
}
@Override
public final Object invokeSuspend(Object obj) {
Object c10;
c10 = pn.d.c();
int i10 = this.f38376a;
aa aaVar = null;
if (i10 != 0) {
if (i10 == 1) {
o.b(obj);
} else {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
} else {
o.b(obj);
aa aaVar2 = j.this.B;
if (aaVar2 == null) {
r.z("binding");
aaVar2 = null;
}
aaVar2.T.setClickable(false);
aa aaVar3 = j.this.B;
if (aaVar3 == null) {
r.z("binding");
aaVar3 = null;
}
aaVar3.M.setClickable(false);
aa aaVar4 = j.this.B;
if (aaVar4 == null) {
r.z("binding");
aaVar4 = null;
}
aaVar4.L.setClickable(false);
aa aaVar5 = j.this.B;
if (aaVar5 == null) {
r.z("binding");
aaVar5 = null;
}
aaVar5.f19372j.setClickable(false);
aa aaVar6 = j.this.B;
if (aaVar6 == null) {
r.z("binding");
aaVar6 = null;
}
aaVar6.f19367e.setClickable(false);
aa aaVar7 = j.this.B;
if (aaVar7 == null) {
r.z("binding");
aaVar7 = null;
}
aaVar7.f19376o.setClickable(false);
this.f38376a = 1;
if (w0.a(400L, this) == c10) {
return c10;
}
}
aa aaVar8 = j.this.B;
if (aaVar8 == null) {
r.z("binding");
aaVar8 = null;
}
aaVar8.T.setClickable(true);
aa aaVar9 = j.this.B;
if (aaVar9 == null) {
r.z("binding");
aaVar9 = null;
}
aaVar9.M.setClickable(true);
aa aaVar10 = j.this.B;
if (aaVar10 == null) {
r.z("binding");
aaVar10 = null;
}
aaVar10.L.setClickable(true);
aa aaVar11 = j.this.B;
if (aaVar11 == null) {
r.z("binding");
aaVar11 = null;
}
aaVar11.f19372j.setClickable(true);
aa aaVar12 = j.this.B;
if (aaVar12 == null) {
r.z("binding");
aaVar12 = null;
}
aaVar12.f19367e.setClickable(true);
aa aaVar13 = j.this.B;
if (aaVar13 == null) {
r.z("binding");
} else {
aaVar = aaVar13;
}
aaVar.f19376o.setClickable(true);
return v.f26314a;
}
}
@kotlin.coroutines.jvm.internal.f(c = "com.zoostudio.moneylover.billing.feature.FragmentStoreFeatureV2$delayClickGoPremium$1", f = "FragmentStoreFeatureV2.kt", l = {595}, m = "invokeSuspend")
public static final class e extends l implements p<m0, on.d<? super v>, Object> {
int f38378a;
e(on.d<? super e> dVar) {
super(2, dVar);
}
@Override
public final on.d<v> create(Object obj, on.d<?> dVar) {
return new e(dVar);
}
@Override
public final Object invoke(m0 m0Var, on.d<? super v> dVar) {
return ((e) create(m0Var, dVar)).invokeSuspend(v.f26314a);
}
@Override
public final Object invokeSuspend(Object obj) {
Object c10;
c10 = pn.d.c();
int i10 = this.f38378a;
aa aaVar = null;
if (i10 != 0) {
if (i10 == 1) {
o.b(obj);
} else {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
} else {
o.b(obj);
aa aaVar2 = j.this.B;
if (aaVar2 == null) {
r.z("binding");
aaVar2 = null;
}
aaVar2.M.setClickable(false);
aa aaVar3 = j.this.B;
if (aaVar3 == null) {
r.z("binding");
aaVar3 = null;
}
aaVar3.L.setClickable(false);
aa aaVar4 = j.this.B;
if (aaVar4 == null) {
r.z("binding");
aaVar4 = null;
}
aaVar4.f19372j.setClickable(false);
aa aaVar5 = j.this.B;
if (aaVar5 == null) {
r.z("binding");
aaVar5 = null;
}
aaVar5.f19367e.setClickable(false);
this.f38378a = 1;
if (w0.a(1000L, this) == c10) {
return c10;
}
}
aa aaVar6 = j.this.B;
if (aaVar6 == null) {
r.z("binding");
aaVar6 = null;
}
aaVar6.M.setClickable(true);
aa aaVar7 = j.this.B;
if (aaVar7 == null) {
r.z("binding");
aaVar7 = null;
}
aaVar7.L.setClickable(true);
aa aaVar8 = j.this.B;
if (aaVar8 == null) {
r.z("binding");
aaVar8 = null;
}
aaVar8.f19372j.setClickable(true);
aa aaVar9 = j.this.B;
if (aaVar9 == null) {
r.z("binding");
} else {
aaVar = aaVar9;
}
aaVar.f19367e.setClickable(true);
return v.f26314a;
}
}
@kotlin.coroutines.jvm.internal.f(c = "com.zoostudio.moneylover.billing.feature.FragmentStoreFeatureV2$delayClickIcon$1", f = "FragmentStoreFeatureV2.kt", l = {650}, m = "invokeSuspend")
public static final class f extends l implements p<m0, on.d<? super v>, Object> {
int f38380a;
f(on.d<? super f> dVar) {
super(2, dVar);
}
@Override
public final on.d<v> create(Object obj, on.d<?> dVar) {
return new f(dVar);
}
@Override
public final Object invoke(m0 m0Var, on.d<? super v> dVar) {
return ((f) create(m0Var, dVar)).invokeSuspend(v.f26314a);
}
@Override
public final Object invokeSuspend(Object obj) {
Object c10;
c10 = pn.d.c();
int i10 = this.f38380a;
aa aaVar = null;
if (i10 != 0) {
if (i10 == 1) {
o.b(obj);
} else {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
} else {
o.b(obj);
aa aaVar2 = j.this.B;
if (aaVar2 == null) {
r.z("binding");
aaVar2 = null;
}
aaVar2.T.setClickable(false);
aa aaVar3 = j.this.B;
if (aaVar3 == null) {
r.z("binding");
aaVar3 = null;
}
aaVar3.M.setClickable(false);
aa aaVar4 = j.this.B;
if (aaVar4 == null) {
r.z("binding");
aaVar4 = null;
}
aaVar4.f19372j.setClickable(false);
aa aaVar5 = j.this.B;
if (aaVar5 == null) {
r.z("binding");
aaVar5 = null;
}
aaVar5.f19376o.setClickable(false);
this.f38380a = 1;
if (w0.a(400L, this) == c10) {
return c10;
}
}
aa aaVar6 = j.this.B;
if (aaVar6 == null) {
r.z("binding");
aaVar6 = null;
}
aaVar6.T.setClickable(true);
aa aaVar7 = j.this.B;
if (aaVar7 == null) {
r.z("binding");
aaVar7 = null;
}
aaVar7.M.setClickable(true);
aa aaVar8 = j.this.B;
if (aaVar8 == null) {
r.z("binding");
aaVar8 = null;
}
aaVar8.f19372j.setClickable(true);
aa aaVar9 = j.this.B;
if (aaVar9 == null) {
r.z("binding");
} else {
aaVar = aaVar9;
}
aaVar.f19376o.setClickable(true);
return v.f26314a;
}
}
@kotlin.coroutines.jvm.internal.f(c = "com.zoostudio.moneylover.billing.feature.FragmentStoreFeatureV2$delayClickLinkWallet$1", f = "FragmentStoreFeatureV2.kt", l = {632}, m = "invokeSuspend")
public static final class g extends l implements p<m0, on.d<? super v>, Object> {
int f38382a;
g(on.d<? super g> dVar) {
super(2, dVar);
}
@Override
public final on.d<v> create(Object obj, on.d<?> dVar) {
return new g(dVar);
}
@Override
public final Object invoke(m0 m0Var, on.d<? super v> dVar) {
return ((g) create(m0Var, dVar)).invokeSuspend(v.f26314a);
}
@Override
public final Object invokeSuspend(Object obj) {
Object c10;
c10 = pn.d.c();
int i10 = this.f38382a;
aa aaVar = null;
if (i10 != 0) {
if (i10 == 1) {
o.b(obj);
} else {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
} else {
o.b(obj);
aa aaVar2 = j.this.B;
if (aaVar2 == null) {
r.z("binding");
aaVar2 = null;
}
aaVar2.T.setClickable(false);
aa aaVar3 = j.this.B;
if (aaVar3 == null) {
r.z("binding");
aaVar3 = null;
}
aaVar3.L.setClickable(false);
aa aaVar4 = j.this.B;
if (aaVar4 == null) {
r.z("binding");
aaVar4 = null;
}
aaVar4.f19376o.setClickable(false);
aa aaVar5 = j.this.B;
if (aaVar5 == null) {
r.z("binding");
aaVar5 = null;
}
aaVar5.f19367e.setClickable(false);
this.f38382a = 1;
if (w0.a(400L, this) == c10) {
return c10;
}
}
aa aaVar6 = j.this.B;
if (aaVar6 == null) {
r.z("binding");
aaVar6 = null;
}
aaVar6.T.setClickable(true);
aa aaVar7 = j.this.B;
if (aaVar7 == null) {
r.z("binding");
aaVar7 = null;
}
aaVar7.L.setClickable(true);
aa aaVar8 = j.this.B;
if (aaVar8 == null) {
r.z("binding");
aaVar8 = null;
}
aaVar8.f19367e.setClickable(true);
aa aaVar9 = j.this.B;
if (aaVar9 == null) {
r.z("binding");
} else {
aaVar = aaVar9;
}
aaVar.f19376o.setClickable(true);
return v.f26314a;
}
}
@kotlin.coroutines.jvm.internal.f(c = "com.zoostudio.moneylover.billing.feature.FragmentStoreFeatureV2$getListProductFromServer$1", f = "FragmentStoreFeatureV2.kt", l = {459}, m = "invokeSuspend")
public static final class h extends l implements p<m0, on.d<? super v>, Object> {
int f38384a;
h(on.d<? super h> dVar) {
super(2, dVar);
}
@Override
public final on.d<v> create(Object obj, on.d<?> dVar) {
return new h(dVar);
}
@Override
public final Object invoke(m0 m0Var, on.d<? super v> dVar) {
return ((h) create(m0Var, dVar)).invokeSuspend(v.f26314a);
}
@Override
public final Object invokeSuspend(Object obj) {
Object c10;
String str;
c10 = pn.d.c();
int i10 = this.f38384a;
if (i10 != 0) {
if (i10 == 1) {
o.b(obj);
} else {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
} else {
o.b(obj);
if (m7.a.f27647b) {
str = "https://statictest.moneylover.me/icon_pack/icon_pack_debug.json";
} else {
str = "https://static.moneylover.me/icon_pack/icon_pack.json";
}
n7.g gVar = new n7.g(str);
this.f38384a = 1;
obj = gVar.d(this);
if (obj == c10) {
return c10;
}
}
String str2 = (String) obj;
if (str2 != null) {
j jVar = j.this;
ArrayList<PaymentItem> b10 = a1.b(jVar.getContext(), new JSONArray(str2));
r.e(b10);
jVar.t0(b10);
jVar.Q0(b10);
v vVar = v.f26314a;
j jVar2 = j.this;
if (jVar2.isAdded() && !rt.e.b(jVar2.requireContext())) {
jVar2.C0();
}
}
return v.f26314a;
}
}
public static final class i implements o9.k<Boolean> {
i() {
}
@Override
public void a(l0<Boolean> l0Var) {
aa aaVar = j.this.B;
if (aaVar == null) {
r.z("binding");
aaVar = null;
}
ConstraintLayout layoutMoneyInsiderStore = aaVar.C1;
r.g(layoutMoneyInsiderStore, "layoutMoneyInsiderStore");
el.d.d(layoutMoneyInsiderStore);
}
@Override
public void b(l0<Boolean> l0Var, Boolean bool) {
aa aaVar = null;
if (r.c(bool, Boolean.FALSE)) {
aa aaVar2 = j.this.B;
if (aaVar2 == null) {
r.z("binding");
} else {
aaVar = aaVar2;
}
ConstraintLayout layoutMoneyInsiderStore = aaVar.C1;
r.g(layoutMoneyInsiderStore, "layoutMoneyInsiderStore");
el.d.d(layoutMoneyInsiderStore);
return;
}
j.this.y0();
aa aaVar3 = j.this.B;
if (aaVar3 == null) {
r.z("binding");
aaVar3 = null;
}
ConstraintLayout layoutMoneyInsiderStore2 = aaVar3.C1;
r.g(layoutMoneyInsiderStore2, "layoutMoneyInsiderStore");
el.d.k(layoutMoneyInsiderStore2);
if (!zi.f.a().z1().booleanValue()) {
aa aaVar4 = j.this.B;
if (aaVar4 == null) {
r.z("binding");
aaVar4 = null;
}
ConstraintLayout layoutUnSubscribed = aaVar4.V1;
r.g(layoutUnSubscribed, "layoutUnSubscribed");
el.d.k(layoutUnSubscribed);
aa aaVar5 = j.this.B;
if (aaVar5 == null) {
r.z("binding");
} else {
aaVar = aaVar5;
}
ConstraintLayout layoutSubscribedStore = aaVar.K1;
r.g(layoutSubscribedStore, "layoutSubscribedStore");
el.d.d(layoutSubscribedStore);
return;
}
ng.e a10 = MoneyInsiderStoreActivity.M.a();
if (a10 == null) {
aa aaVar6 = j.this.B;
if (aaVar6 == null) {
r.z("binding");
aaVar6 = null;
}
ConstraintLayout layoutUnSubscribed2 = aaVar6.V1;
r.g(layoutUnSubscribed2, "layoutUnSubscribed");
el.d.k(layoutUnSubscribed2);
aa aaVar7 = j.this.B;
if (aaVar7 == null) {
r.z("binding");
} else {
aaVar = aaVar7;
}
ConstraintLayout layoutSubscribedStore2 = aaVar.K1;
r.g(layoutSubscribedStore2, "layoutSubscribedStore");
el.d.d(layoutSubscribedStore2);
return;
}
String a11 = a10.a();
if (a11 != null) {
j.this.X0(a11);
}
aa aaVar8 = j.this.B;
if (aaVar8 == null) {
r.z("binding");
aaVar8 = null;
}
ConstraintLayout layoutUnSubscribed3 = aaVar8.V1;
r.g(layoutUnSubscribed3, "layoutUnSubscribed");
el.d.d(layoutUnSubscribed3);
aa aaVar9 = j.this.B;
if (aaVar9 == null) {
r.z("binding");
} else {
aaVar = aaVar9;
}
ConstraintLayout layoutSubscribedStore3 = aaVar.K1;
r.g(layoutSubscribedStore3, "layoutSubscribedStore");
el.d.k(layoutSubscribedStore3);
}
}
public static final class C0672j extends BroadcastReceiver {
C0672j() {
}
@Override
public void onReceive(Context context, Intent intent) {
j.this.J0();
j.this.H0();
j.this.E0();
j.this.I0();
}
}
@kotlin.coroutines.jvm.internal.f(c = "com.zoostudio.moneylover.billing.feature.FragmentStoreFeatureV2$reload$1", f = "FragmentStoreFeatureV2.kt", l = {489}, m = "invokeSuspend")
public static final class k extends l implements p<m0, on.d<? super v>, Object> {
int f38388a;
final long f38389b;
final j f38390c;
public static final class a implements g.e {
final j f38391a;
a(j jVar) {
this.f38391a = jVar;
}
@Override
public void onFail(MoneyError error) {
r.h(error, "error");
qe.b.b(error);
}
@Override
public void onSuccess(JSONObject data) {
r.h(data, "data");
try {
Context context = this.f38391a.getContext();
if (context != null) {
qe.a.u(context, data);
}
we.g.o(this.f38391a.getContext(), data.getJSONObject("data"));
y.b(com.zoostudio.moneylover.utils.v.STORE_PREMIUM_SHOW_BUTTON_BUY);
com.zoostudio.moneylover.views.h hVar = this.f38391a.f38373q;
if (hVar != null) {
hVar.c();
}
this.f38391a.J0();
this.f38391a.H0();
this.f38391a.E0();
this.f38391a.I0();
} catch (ParseException e10) {
qe.b.b(e10);
} catch (JSONException e11) {
qe.b.b(e11);
}
}
}
k(long j10, j jVar, on.d<? super k> dVar) {
super(2, dVar);
this.f38389b = j10;
this.f38390c = jVar;
}
@Override
public final on.d<v> create(Object obj, on.d<?> dVar) {
return new k(this.f38389b, this.f38390c, dVar);
}
@Override
public final Object invoke(m0 m0Var, on.d<? super v> dVar) {
return ((k) create(m0Var, dVar)).invokeSuspend(v.f26314a);
}
@Override
public final Object invokeSuspend(Object obj) {
Object c10;
c10 = pn.d.c();
int i10 = this.f38388a;
if (i10 != 0) {
if (i10 == 1) {
o.b(obj);
} else {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
} else {
o.b(obj);
long j10 = this.f38389b;
this.f38388a = 1;
if (w0.a(j10, this) == c10) {
return c10;
}
}
this.f38390c.W0(false);
i0.f37500a.c(new a(this.f38390c));
return v.f26314a;
}
}
public static final void A0(j this$0, View view) {
r.h(this$0, "this$0");
Context context = this$0.getContext();
if (context != null) {
HashMap hashMap = new HashMap();
hashMap.put("start_screen", "store");
v vVar = v.f26314a;
qe.a.k(context, "money_insider_show_money_insider_store", hashMap);
}
this$0.startActivity(new Intent(this$0.getContext(), (Class<?>) MoneyInsiderStoreActivity.class));
}
public static final void B0(j this$0, View view) {
r.h(this$0, "this$0");
this$0.startActivity(new Intent(this$0.getContext(), (Class<?>) MoneyInsiderStoreActivity.class));
}
public final void C0() {
q activity = getActivity();
if (activity != null) {
activity.runOnUiThread(new Runnable() {
@Override
public final void run() {
j.D0(j.this);
}
});
}
}
public static final void D0(j this$0) {
r.h(this$0, "this$0");
a1.c(this$0.getContext(), this$0.getString(R.string.no_internet));
}
public final void E0() {
Context context = getContext();
if (context != null) {
if (zg.a.a(context)) {
if (zi.f.a().a2()) {
O0();
return;
} else {
P0();
return;
}
}
w0();
}
}
public static final void F0(j this$0, View view) {
r.h(this$0, "this$0");
q activity = this$0.getActivity();
if (activity != null) {
activity.onBackPressed();
}
}
public static final void G0(j this$0, View view) {
r.h(this$0, "this$0");
com.zoostudio.moneylover.views.i.d(this$0.getContext());
}
public final void H0() {
if (zi.f.a().l2()) {
V0();
} else {
T0();
}
}
public final void I0() {
boolean z10;
Context context = null;
aa aaVar = null;
if (!zi.f.a().t2()) {
aa aaVar2 = this.B;
if (aaVar2 == null) {
r.z("binding");
} else {
aaVar = aaVar2;
}
ConstraintLayout layoutMoneyInsiderStore = aaVar.C1;
r.g(layoutMoneyInsiderStore, "layoutMoneyInsiderStore");
el.d.d(layoutMoneyInsiderStore);
return;
}
String F1 = zi.f.a().F1();
r.g(F1, "getTagMoneyInsider(...)");
if (F1.length() > 0) {
z10 = true;
} else {
z10 = false;
}
if (z10) {
Context context2 = this.f38364c;
if (context2 == null) {
r.z("mContext");
} else {
context = context2;
}
String F12 = zi.f.a().F1();
r.g(F12, "getTagMoneyInsider(...)");
wj.e eVar = new wj.e(context, F12);
eVar.g(new i());
eVar.c();
}
}
public final void J0() {
if (zi.f.a().t2()) {
U0();
} else {
S0();
}
}
private final void K0() {
int i10;
CarouselView carouselView = this.f38365d;
if (carouselView != null) {
carouselView.setOnGetViewListener(new CarouselView.d() {
@Override
public final View a(int i11) {
View L0;
L0 = j.L0(j.this, i11);
return L0;
}
});
}
CarouselView carouselView2 = this.f38365d;
if (carouselView2 != null) {
carouselView2.setOnClickCarouselItemListener(new CarouselView.c() {
@Override
public final void a(int i11) {
j.M0(j.this, i11);
}
});
}
CarouselView carouselView3 = this.f38365d;
if (carouselView3 != null) {
ArrayList<PaymentItem> arrayList = this.f38372p;
if (arrayList != null) {
i10 = arrayList.size();
} else {
i10 = 0;
}
carouselView3.setCount(i10);
}
CarouselView carouselView4 = this.f38365d;
if (carouselView4 != null) {
carouselView4.g();
}
}
public static final View L0(j this$0, int i10) {
PaymentItem paymentItem;
r.h(this$0, "this$0");
View inflate = LayoutInflater.from(this$0.getActivity()).inflate(R.layout.item_feature, (ViewGroup) null);
View findViewById = inflate.findViewById(R.id.imvCover);
r.g(findViewById, "findViewById(...)");
ImageViewGlide imageViewGlide = (ImageViewGlide) findViewById;
TextView textView = (TextView) inflate.findViewById(R.id.txvName);
ArrayList<PaymentItem> arrayList = this$0.f38372p;
if (arrayList != null && (paymentItem = arrayList.get(i10)) != null) {
if (!b1.g(paymentItem.getPreview())) {
String preview = paymentItem.getPreview();
r.g(preview, "getPreview(...)");
imageViewGlide.setImageUrl(preview);
}
if (!b1.g(paymentItem.getName())) {
textView.setText(paymentItem.getName());
}
}
return inflate;
}
public static final void M0(j this$0, int i10) {
PaymentItem paymentItem;
r.h(this$0, "this$0");
ArrayList<PaymentItem> arrayList = this$0.f38372p;
if (arrayList != null && (paymentItem = arrayList.get(i10)) != null && !b1.g(paymentItem.getProductId())) {
this$0.R0(paymentItem);
}
}
private final void O0() {
int M2 = zi.f.a().M();
if (M2 > 3) {
getResources().getQuantityString(R.plurals.count_down_budget_plus_expired, M2, Integer.valueOf(M2));
} else {
new n(getContext()).i(zi.f.a().J());
}
}
private final void P0() {
}
public final void Q0(ArrayList<PaymentItem> arrayList) {
ArrayList<PaymentItem> arrayList2;
ArrayList<PaymentItem> arrayList3 = this.f38372p;
if (arrayList3 != null) {
arrayList3.clear();
}
Iterator<PaymentItem> it = arrayList.iterator();
while (it.hasNext()) {
PaymentItem next = it.next();
if (next.isFeature() && (arrayList2 = this.f38372p) != null) {
arrayList2.add(next);
}
}
K0();
}
private final void R0(PaymentItem paymentItem) {
Bundle bundle = new Bundle();
bundle.putParcelable("extra_payment_item", paymentItem);
Intent intent = new Intent(getActivity(), (Class<?>) ActivityIconPackDetail.class);
intent.putExtras(bundle);
startActivityForResult(intent, 70);
}
private final void S0() {
View view = this.f38367f;
if (view != null) {
view.setVisibility(8);
}
View view2 = this.f38366e;
if (view2 != null) {
view2.setVisibility(0);
}
}
private final void T0() {
View view = this.f38368g;
if (view != null) {
view.setVisibility(0);
}
View view2 = this.f38369i;
if (view2 != null) {
view2.setVisibility(8);
}
}
private final void U0() {
View view = this.f38367f;
if (view != null) {
view.setVisibility(0);
}
View view2 = this.f38366e;
if (view2 != null) {
view2.setVisibility(8);
}
TextView textView = this.f38370j;
if (textView != null) {
textView.setVisibility(8);
}
}
private final void V0() {
String i10;
View view = this.f38368g;
if (view != null) {
view.setVisibility(8);
}
View view2 = this.f38369i;
if (view2 != null) {
view2.setVisibility(0);
}
int O0 = zi.f.a().O0();
if (O0 > 3) {
i10 = getResources().getQuantityString(R.plurals.day_exprire_linked_wallet, O0, Integer.valueOf(O0));
} else {
i10 = new n(getContext()).i(zi.f.a().N0());
}
TextView textView = this.f38371o;
if (textView != null) {
textView.setText(i10);
}
}
public final void W0(boolean z10) {
aa aaVar = null;
if (z10) {
aa aaVar2 = this.B;
if (aaVar2 == null) {
r.z("binding");
aaVar2 = null;
}
aaVar2.f19375me.setVisibility(0);
aa aaVar3 = this.B;
if (aaVar3 == null) {
r.z("binding");
aaVar3 = null;
}
aaVar3.f19363c.setVisibility(4);
aa aaVar4 = this.B;
if (aaVar4 == null) {
r.z("binding");
} else {
aaVar = aaVar4;
}
aaVar.f19363c.setClickable(false);
return;
}
aa aaVar5 = this.B;
if (aaVar5 == null) {
r.z("binding");
aaVar5 = null;
}
aaVar5.f19375me.setVisibility(8);
aa aaVar6 = this.B;
if (aaVar6 == null) {
r.z("binding");
aaVar6 = null;
}
aaVar6.f19363c.setVisibility(0);
aa aaVar7 = this.B;
if (aaVar7 == null) {
r.z("binding");
} else {
aaVar = aaVar7;
}
aaVar.f19363c.setClickable(true);
}
public final void X0(String str) {
int r10 = org.joda.time.g.p(new org.joda.time.b(), new org.joda.time.b(str)).r();
aa aaVar = this.B;
Context context = null;
if (aaVar == null) {
r.z("binding");
aaVar = null;
}
TextView textView = aaVar.Ak;
Context context2 = this.f38364c;
if (context2 == null) {
r.z("mContext");
} else {
context = context2;
}
textView.setText(context.getString(R.string.money_insider_expires_in_days, Integer.valueOf(r10)));
}
private final void o0() {
rq.k.d(androidx.lifecycle.q.a(this), null, null, new d(null), 3, null);
}
private final void p0() {
rq.k.d(androidx.lifecycle.q.a(this), null, null, new e(null), 3, null);
}
private final void q0() {
rq.k.d(androidx.lifecycle.q.a(this), null, null, new f(null), 3, null);
}
private final void r0() {
rq.k.d(androidx.lifecycle.q.a(this), null, null, new g(null), 3, null);
}
private final void s0(PaymentItem paymentItem) {
paymentItem.setDownloading(true);
Intent intent = new Intent(getContext(), (Class<?>) MoneyDownloadService.class);
intent.putExtra("extra_payment_item", paymentItem);
Context context = getContext();
if (context != null) {
try {
androidx.core.content.a.startForegroundService(context.getApplicationContext(), intent);
} catch (Exception e10) {
FirebaseCrashlytics.getInstance().recordException(e10);
}
}
}
public final void t0(final ArrayList<PaymentItem> arrayList) {
ActivityStoreV2 activityStoreV2;
Context context = getContext();
if (context == null) {
return;
}
SharedPreferences.Editor edit = androidx.preference.j.b(context).edit();
edit.putInt("num_store_new", 0);
edit.apply();
if (arrayList.size() > 0 && (activityStoreV2 = (ActivityStoreV2) getActivity()) != null) {
activityStoreV2.v1(arrayList, PaymentItem.TYPE_INAPP, new q0.a() {
@Override
public final void a(ArrayList arrayList2, boolean z10) {
j.u0(j.this, arrayList, arrayList2, z10);
}
});
}
}
public static final void u0(j this$0, ArrayList listFromServer, ArrayList arrayList, boolean z10) {
r.h(this$0, "this$0");
r.h(listFromServer, "$listFromServer");
if (!z10 || !this$0.isAdded()) {
return;
}
ArrayList<PaymentItem> a10 = a1.a(listFromServer, arrayList);
if (a10.size() > 0) {
r.e(a10);
this$0.Q0(a10);
}
}
private final void v0() {
rq.k.d(androidx.lifecycle.q.a(this), null, null, new h(null), 3, null);
}
private final void w0() {
}
public final void y0() {
aa aaVar = this.B;
aa aaVar2 = null;
if (aaVar == null) {
r.z("binding");
aaVar = null;
}
aaVar.f19365d.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
j.z0(j.this, view);
}
});
aa aaVar3 = this.B;
if (aaVar3 == null) {
r.z("binding");
aaVar3 = null;
}
aaVar3.K1.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
j.A0(j.this, view);
}
});
aa aaVar4 = this.B;
if (aaVar4 == null) {
r.z("binding");
} else {
aaVar2 = aaVar4;
}
aaVar2.V1.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
j.B0(j.this, view);
}
});
}
public static final void z0(j this$0, View view) {
r.h(this$0, "this$0");
Context context = this$0.getContext();
if (context != null) {
HashMap hashMap = new HashMap();
hashMap.put("start_screen", "store");
v vVar = v.f26314a;
qe.a.k(context, "money_insider_show_money_insider_store", hashMap);
}
this$0.startActivity(new Intent(this$0.getContext(), (Class<?>) MoneyInsiderStoreActivity.class));
}
@Override
public void B(Context context) {
r.h(context, "context");
super.B(context);
il.b.a(this.H, "com.zoostudio.moneylover.utils.BOUGHT_PREMIUM");
il.b.a(this.C, "com.zoostudio.moneylover.utils.BUY_BUDGET_PLUS_SUCCESS");
}
@Override
public void J() {
super.J();
il.b.b(this.H);
il.a.f23703a.g(this.C);
}
@Override
public void K() {
super.K();
v0();
}
@Override
protected void M(Bundle bundle) {
ActivityStoreV2.f11119df = false;
aa aaVar = this.B;
aa aaVar2 = null;
if (aaVar == null) {
r.z("binding");
aaVar = null;
}
this.f38365d = aaVar.f19368f;
aa aaVar3 = this.B;
if (aaVar3 == null) {
r.z("binding");
aaVar3 = null;
}
this.f38366e = aaVar3.Y;
aa aaVar4 = this.B;
if (aaVar4 == null) {
r.z("binding");
aaVar4 = null;
}
this.f38367f = aaVar4.Z;
aa aaVar5 = this.B;
if (aaVar5 == null) {
r.z("binding");
aaVar5 = null;
}
this.f38368g = aaVar5.Q;
aa aaVar6 = this.B;
if (aaVar6 == null) {
r.z("binding");
aaVar6 = null;
}
this.f38369i = aaVar6.R;
aa aaVar7 = this.B;
if (aaVar7 == null) {
r.z("binding");
aaVar7 = null;
}
this.f38370j = aaVar7.Jk;
aa aaVar8 = this.B;
if (aaVar8 == null) {
r.z("binding");
aaVar8 = null;
}
this.f38371o = aaVar8.Hk;
aa aaVar9 = this.B;
if (aaVar9 == null) {
r.z("binding");
aaVar9 = null;
}
aaVar9.T.setOnClickListener(this);
aa aaVar10 = this.B;
if (aaVar10 == null) {
r.z("binding");
aaVar10 = null;
}
aaVar10.H.setOnClickListener(this);
aa aaVar11 = this.B;
if (aaVar11 == null) {
r.z("binding");
aaVar11 = null;
}
aaVar11.L.setOnClickListener(this);
aa aaVar12 = this.B;
if (aaVar12 == null) {
r.z("binding");
aaVar12 = null;
}
aaVar12.M.setOnClickListener(this);
aa aaVar13 = this.B;
if (aaVar13 == null) {
r.z("binding");
aaVar13 = null;
}
aaVar13.f19369g.setOnClickListener(this);
aa aaVar14 = this.B;
if (aaVar14 == null) {
r.z("binding");
aaVar14 = null;
}
aaVar14.f19378q.setOnClickListener(this);
aa aaVar15 = this.B;
if (aaVar15 == null) {
r.z("binding");
aaVar15 = null;
}
aaVar15.f19376o.setOnClickListener(this);
aa aaVar16 = this.B;
if (aaVar16 == null) {
r.z("binding");
aaVar16 = null;
}
aaVar16.f19372j.setOnClickListener(this);
aa aaVar17 = this.B;
if (aaVar17 == null) {
r.z("binding");
aaVar17 = null;
}
aaVar17.f19377p.setOnClickListener(this);
aa aaVar18 = this.B;
if (aaVar18 == null) {
r.z("binding");
aaVar18 = null;
}
aaVar18.f19367e.setOnClickListener(this);
aa aaVar19 = this.B;
if (aaVar19 == null) {
r.z("binding");
aaVar19 = null;
}
aaVar19.f19363c.setOnClickListener(this);
aa aaVar20 = this.B;
if (aaVar20 == null) {
r.z("binding");
aaVar20 = null;
}
aaVar20.V1.setOnClickListener(this);
int i10 = 8;
if (m7.e.U) {
aa aaVar21 = this.B;
if (aaVar21 == null) {
r.z("binding");
aaVar21 = null;
}
aaVar21.f19362b.setVisibility(0);
aa aaVar22 = this.B;
if (aaVar22 == null) {
r.z("binding");
aaVar22 = null;
}
aaVar22.f19370i.setVisibility(0);
aa aaVar23 = this.B;
if (aaVar23 == null) {
r.z("binding");
aaVar23 = null;
}
aaVar23.f19362b.setOnClickListener(this);
} else {
aa aaVar24 = this.B;
if (aaVar24 == null) {
r.z("binding");
aaVar24 = null;
}
aaVar24.f19362b.setVisibility(8);
aa aaVar25 = this.B;
if (aaVar25 == null) {
r.z("binding");
aaVar25 = null;
}
aaVar25.f19370i.setVisibility(8);
}
if (m7.e.J) {
aa aaVar26 = this.B;
if (aaVar26 == null) {
r.z("binding");
aaVar26 = null;
}
aaVar26.M.setVisibility(0);
}
aa aaVar27 = this.B;
if (aaVar27 == null) {
r.z("binding");
aaVar27 = null;
}
RelativeLayout relativeLayout = aaVar27.H;
if (FirebaseRemoteConfig.getInstance().getBoolean("store_credit_enable")) {
i10 = 0;
}
relativeLayout.setVisibility(i10);
aa aaVar28 = this.B;
if (aaVar28 == null) {
r.z("binding");
} else {
aaVar2 = aaVar28;
}
MLToolbar toolbar = aaVar2.f19384xk;
r.g(toolbar, "toolbar");
toolbar.setTitle(getString(R.string.store__tab_featured));
toolbar.j(R.drawable.ic_arrow_left, new View.OnClickListener() {
@Override
public final void onClick(View view) {
j.F0(j.this, view);
}
});
this.f38373q = new com.zoostudio.moneylover.views.h(getContext());
Toolbar.g gVar = new Toolbar.g(8388613);
gVar.setMargins(0, 10, 0, 0);
toolbar.addView(this.f38373q, gVar);
com.zoostudio.moneylover.views.h hVar = this.f38373q;
if (hVar != null) {
hVar.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
j.G0(j.this, view);
}
});
}
zf.d.d(toolbar);
if (!zi.f.a().t2()) {
Context requireContext = requireContext();
r.g(requireContext, "requireContext(...)");
qe.a.l(requireContext, "v_go_premium_cta", Constants.MessagePayloadKeys.FROM, "store");
}
}
@Override
protected void N(Bundle bundle) {
this.f38372p = new ArrayList<>(5);
for (int i10 = 0; i10 < 5; i10++) {
ArrayList<PaymentItem> arrayList = this.f38372p;
if (arrayList != null) {
arrayList.add(new PaymentItem(PaymentItem.TYPE_INAPP, "null"));
}
}
}
public final void N0(long j10) {
rq.k.d(androidx.lifecycle.q.a(this), null, null, new k(j10, this, null), 3, null);
}
@Override
public void O(Context context, PaymentItem paymentItem) {
W0(false);
}
@Override
public void P(Context context, PaymentItem paymentItem) {
W0(false);
com.zoostudio.moneylover.views.h hVar = this.f38373q;
if (hVar != null) {
hVar.c();
}
J0();
H0();
E0();
I0();
}
@Override
public void Q(Context context) {
super.Q(context);
W0(false);
com.zoostudio.moneylover.views.h hVar = this.f38373q;
if (hVar != null) {
hVar.c();
}
J0();
H0();
E0();
I0();
}
@Override
public void onActivityResult(int i10, int i11, Intent intent) {
PaymentItem paymentItem;
super.onActivityResult(i10, i11, intent);
if (i11 == -1 && i10 == 70) {
if (intent != null) {
paymentItem = (PaymentItem) intent.getParcelableExtra("extra_payment_item");
} else {
paymentItem = null;
}
if (paymentItem != null && (paymentItem.isFree() || paymentItem.isPurchased())) {
s0(paymentItem);
return;
}
ActivityStoreV2 activityStoreV2 = (ActivityStoreV2) getActivity();
if (activityStoreV2 != null) {
activityStoreV2.r1(paymentItem);
}
}
}
@Override
public void onAttach(Context context) {
r.h(context, "context");
super.onAttach(context);
this.f38364c = context;
}
@Override
public void onClick(View view) {
r.h(view, "view");
switch (view.getId()) {
case R.id.btnEnterCode:
startActivity(new Intent(getContext(), (Class<?>) ActivityEnterCode.class));
return;
case R.id.btnRestorePurchase:
try {
W0(true);
ActivityStoreV2 activityStoreV2 = (ActivityStoreV2) getActivity();
if (activityStoreV2 != null) {
activityStoreV2.J1();
return;
}
return;
} catch (RemoteException e10) {
e10.printStackTrace();
qe.b.b(e10);
return;
} catch (JSONException e11) {
e11.printStackTrace();
qe.b.b(e11);
return;
}
case R.id.btn_subscribe_plus:
o0();
q activity = getActivity();
if (activity != null) {
qe.a.l(activity, "Budget Plus Viewed", "screen name", "Store");
ue.a.b(activity);
return;
}
return;
case R.id.buy_icon:
q0();
y.b(com.zoostudio.moneylover.utils.v.STORE_VISIT_ICON);
y.d0();
ActivityStoreV2 activityStoreV22 = (ActivityStoreV2) getActivity();
if (activityStoreV22 != null) {
activityStoreV22.M1(2);
return;
}
return;
case R.id.contact:
x0();
return;
case R.id.go_linked_wallet:
r0();
y.b(com.zoostudio.moneylover.utils.v.STORE_VISIT_LINKED_WALLET);
y.g0();
startActivity(new Intent(requireActivity(), (Class<?>) StoreLinkedWalletActivity.class));
return;
case R.id.go_premium:
p0();
Context requireContext = requireContext();
r.g(requireContext, "requireContext(...)");
qe.a.l(requireContext, "c_go_premium_cta", Constants.MessagePayloadKeys.FROM, "cta_button_store");
y.b(com.zoostudio.moneylover.utils.v.STORE_VISIT_PREMIUM);
startActivity(ActivityPremiumStore.Ak.c(getContext(), 1, "store"));
return;
case R.id.go_receipt_credits:
y.c0("FragmentStoreFeatureV2");
ActivityStoreV2 activityStoreV23 = (ActivityStoreV2) getActivity();
if (activityStoreV23 != null) {
activityStoreV23.M1(3);
return;
}
return;
case R.id.go_redeem_credits:
startActivity(new Intent(getContext(), (Class<?>) ActivityRedeemCredits.class));
return;
case R.id.groupCredit:
y.c0("FragmentStoreFeatureV2");
ActivityStoreV2 activityStoreV24 = (ActivityStoreV2) getActivity();
if (activityStoreV24 != null) {
activityStoreV24.M1(3);
return;
}
return;
case R.id.groupIcon:
q0();
y.b(com.zoostudio.moneylover.utils.v.STORE_VISIT_ICON);
y.d0();
ActivityStoreV2 activityStoreV25 = (ActivityStoreV2) getActivity();
if (activityStoreV25 != null) {
activityStoreV25.M1(2);
return;
}
return;
case R.id.groupLinkWallet:
r0();
y.b(com.zoostudio.moneylover.utils.v.STORE_VISIT_LINKED_WALLET);
y.g0();
startActivity(new Intent(requireActivity(), (Class<?>) StoreLinkedWalletActivity.class));
return;
case R.id.groupPremium:
Context requireContext2 = requireContext();
r.g(requireContext2, "requireContext(...)");
qe.a.l(requireContext2, "c_go_premium_cta", Constants.MessagePayloadKeys.FROM, "store");
p0();
y.b(com.zoostudio.moneylover.utils.v.STORE_VISIT_PREMIUM);
FirebaseAnalytics.getInstance(view.getContext()).setUserProperty("buy_premium_source", "FragmentStoreFeatureV2");
startActivity(ActivityPremiumStore.Ak.c(getContext(), 1, "store"));
return;
case R.id.group_budget_plus:
o0();
q activity2 = getActivity();
if (activity2 != null) {
qe.a.l(activity2, "Budget Plus Viewed", "screen name", "Store");
ue.a.b(activity2);
return;
}
return;
case R.id.group_budget_plus_subscribed:
o0();
q activity3 = getActivity();
if (activity3 != null) {
ue.a.b(activity3);
return;
}
return;
default:
return;
}
}
@Override
public void onResume() {
super.onResume();
com.zoostudio.moneylover.views.h hVar = this.f38373q;
if (hVar != null) {
hVar.c();
}
J0();
H0();
E0();
I0();
}
public final void x0() {
startActivity(new Intent(getActivity(), (Class<?>) ActivityChatHelp.class));
}
@Override
public View z() {
aa c10 = aa.c(getLayoutInflater());
r.g(c10, "inflate(...)");
this.B = c10;
if (c10 == null) {
r.z("binding");
c10 = null;
}
LinearLayout root = c10.getRoot();
r.g(root, "getRoot(...)");
return root;
}
}