Money Lover v8.14.0.6版本的 MD5 值为:48b9d922212c7ccfd438cdcc183ff396
以下内容为反编译后的 v.java 源代码,内容仅作参考
package com.zoostudio.moneylover.main.transactions;
import android.app.AlertDialog;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.Window;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
import android.widget.ImageButton;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.loader.app.a;
import androidx.viewpager.widget.ViewPager;
import com.bookmark.money.R;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.tabs.TabLayout;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
import com.zoostudio.moneylover.MoneyApplication;
import com.zoostudio.moneylover.familyPlan.activities.ActivityShareWalletV2;
import com.zoostudio.moneylover.familyPlan.views.ViewBadgeNewNotification;
import com.zoostudio.moneylover.help.activity.ActivityCreateNewQuestion;
import com.zoostudio.moneylover.help.utils.HelpsConstant;
import com.zoostudio.moneylover.main.MainActivity;
import com.zoostudio.moneylover.main.duplicateTransaction.DuplicateTransactionActivity;
import com.zoostudio.moneylover.ui.ActivityEditWallet;
import com.zoostudio.moneylover.ui.ActivityFAQV2;
import com.zoostudio.moneylover.ui.ActivityInputInterest;
import com.zoostudio.moneylover.ui.ActivitySplash;
import com.zoostudio.moneylover.ui.activity.ActivityAdjustBalanceV2;
import com.zoostudio.moneylover.ui.activity.ActivityFAQLockApp;
import com.zoostudio.moneylover.ui.activity.ActivityPremiumStore;
import com.zoostudio.moneylover.ui.activity.ActivitySearchSimple;
import com.zoostudio.moneylover.ui.editTransaction.ActivityEditTransaction;
import com.zoostudio.moneylover.ui.onboarding.defaultwallets.AddFirstWalletV4Activity;
import com.zoostudio.moneylover.ui.switcherWallet.ActivityWalletSwitcher;
import com.zoostudio.moneylover.ui.view.AmountColorTextView;
import com.zoostudio.moneylover.ui.view.CashbookViewPager;
import com.zoostudio.moneylover.utils.d1;
import com.zoostudio.moneylover.utils.e0;
import com.zoostudio.moneylover.utils.event.SpecialEvent;
import com.zoostudio.moneylover.utils.event.SpecialEventLoader;
import com.zoostudio.moneylover.utils.h0;
import com.zoostudio.moneylover.utils.m0;
import com.zoostudio.moneylover.utils.y;
import com.zoostudio.moneylover.views.ImageViewGlide;
import com.zoostudio.moneylover.views.MLToolbar;
import h3.la;
import h3.ni;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Objects;
import nh.u0;
import o7.w0;
import ok.j0;
import ok.m1;
import ok.z;
import org.json.JSONException;
import org.zoostudio.fw.view.CustomFontTextView;
import t9.g3;
import v9.b;
import v9.v0;
public class v extends j0 implements a.InterfaceC0080a<SpecialEvent>, v0.b, m1.c {
public static boolean f12973ol = false;
private MLToolbar A1;
private w0 Ak;
private ConstraintLayout Bk;
private Animation C1;
private int C2;
private ConstraintLayout Ck;
private CustomFontTextView Dk;
private MenuItem.OnMenuItemClickListener Ek;
private MenuItem.OnMenuItemClickListener Fk;
private t Gk;
private s Hk;
private la Ik;
private ni Jk;
private Animation K1;
private int K2;
private com.zoostudio.moneylover.adapter.item.a Kk;
private MenuItem Nk;
private MenuItem Ok;
private MenuItem Pk;
private MenuItem Qk;
private MenuItem Rk;
private MenuItem Sk;
private MenuItem Tk;
private MenuItem Uk;
private int V1;
private int V2;
private MenuItem Vk;
private MenuItem Wk;
private long Xk;
private ImageButton f12974al;
private u0 f12975bl;
private CashbookViewPager f12976ci;
private m1 f12981fl;
private boolean f12989ll;
private ViewBadgeNewNotification f12992nl;
private tk.a f12993th;
private AppBarLayout f12994tk;
private TabLayout f12995uk;
private ImageViewGlide f12996vk;
private AmountColorTextView f12997wk;
private AmountColorTextView f12998xk;
private o7.i f12999yk;
private zi.d f13000zk;
private final String K0 = "👀";
private final String f12987k1 = "🛍🍔🥤";
private boolean K3 = false;
private boolean f12984id = false;
private boolean f12990me = false;
private double f12978df = 0.0d;
private final BroadcastReceiver Lk = new i();
private final BroadcastReceiver Mk = new l();
private boolean Yk = false;
private boolean Zk = false;
private final BroadcastReceiver f12977cl = new m();
private final BroadcastReceiver f12979dl = new n();
private final BroadcastReceiver f12980el = new o();
private boolean f12982gl = false;
private boolean f12983hl = false;
private final int f12985il = -1;
private final ViewPager.j f12986jl = new p();
private boolean f12988kl = true;
private final int f12991ml = -1;
public class a implements ViewTreeObserver.OnGlobalLayoutListener {
final int f13001a;
a(int i10) {
this.f13001a = i10;
}
@Override
public void onGlobalLayout() {
v.this.f12995uk.getViewTreeObserver().removeOnGlobalLayoutListener(this);
if (v.this.V2 != 5) {
v.this.q2(this.f13001a);
}
}
}
class b implements Runnable {
b() {
}
@Override
public void run() {
Snackbar.make(v.this.f12976ci, R.string.feedback_thanks_received, 0).show();
}
}
public class c implements View.OnClickListener {
c() {
}
@Override
public void onClick(View view) {
if (v.this.getContext() == null) {
return;
}
qe.a.j(v.this.getContext(), "c_cashbook_search");
v.this.x3();
}
}
public class d implements View.OnClickListener {
d() {
}
@Override
public void onClick(View view) {
v vVar = v.this;
vVar.w3(vVar.Pk.getActionView());
}
}
public class e implements MenuItem.OnMenuItemClickListener {
e() {
}
@Override
public boolean onMenuItemClick(MenuItem menuItem) {
qe.a.l(v.this.requireContext(), "c_time_range", "cashbook", Boolean.TRUE);
v vVar = v.this;
vVar.w3(vVar.A1);
return true;
}
}
public class f implements Runnable {
final int f13007a;
f(int i10) {
this.f13007a = i10;
}
@Override
public void run() {
if (v.this.f12995uk.getTabAt(this.f13007a) != null) {
v.this.f12995uk.getTabAt(this.f13007a).select();
}
}
}
public class g implements AdapterView.OnItemClickListener {
class a implements Runnable {
final int f13010a;
a(int i10) {
this.f13010a = i10;
}
@Override
public void run() {
v.this.b3(this.f13010a, null);
}
}
g() {
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i10, long j10) {
((com.zoostudio.moneylover.ui.view.p) v.this).f14716c.postDelayed(new a(i10), 100L);
v.this.f12993th.dismiss();
}
}
class h implements Runnable {
h() {
}
@Override
public void run() {
v.this.f12995uk.setScrollPosition(v.this.f2(), 0.0f, false);
}
}
class i extends BroadcastReceiver {
i() {
}
@Override
public void onReceive(Context context, Intent intent) {
if (!intent.hasExtra("wallet_item")) {
v.this.D3(intent.getIntExtra("tab_future", 0));
return;
}
com.zoostudio.moneylover.adapter.item.a aVar = (com.zoostudio.moneylover.adapter.item.a) intent.getSerializableExtra("wallet_item");
if (!intent.getBooleanExtra("tab_future", false)) {
v.this.f12978df = 0.0d;
} else {
v.this.f12978df = intent.getDoubleExtra("balance_future", 0.0d);
}
if (aVar.getId() == 0) {
v.this.D3(0);
} else {
v.this.h2(aVar.getId());
}
}
}
class j implements DialogInterface.OnClickListener {
j() {
}
@Override
public void onClick(DialogInterface dialogInterface, int i10) {
dialogInterface.dismiss();
Calendar calendar = Calendar.getInstance();
calendar.add(5, -1);
v.this.s3(calendar);
}
}
class k implements ViewTreeObserver.OnGlobalLayoutListener {
k() {
}
@Override
public void onGlobalLayout() {
v.this.f12995uk.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
}
class l extends BroadcastReceiver {
l() {
}
@Override
public void onReceive(Context context, Intent intent) {
v.this.E3(intent.getBooleanExtra("over_due_state", true));
}
}
class m extends BroadcastReceiver {
m() {
}
@Override
public void onReceive(Context context, Intent intent) {
try {
CustomFontTextView customFontTextView = v.this.Ik.Q;
if (customFontTextView == null) {
return;
}
if (intent.getBooleanExtra(com.zoostudio.moneylover.utils.h.CHANGE.toString(), false)) {
customFontTextView.setText(context.getText(R.string.sync_error_maintenance));
customFontTextView.setVisibility(0);
} else {
customFontTextView.setVisibility(8);
}
} catch (Exception e10) {
FirebaseCrashlytics.getInstance().recordException(e10);
}
}
}
class n extends BroadcastReceiver {
n() {
}
@Override
public void onReceive(Context context, Intent intent) {
y.b(com.zoostudio.moneylover.utils.v.WALLET_CSV_UPLOAD_CSV_SUCCESS);
n9.d remoteAccount = v.this.K().getRemoteAccount();
if (remoteAccount == null) {
return;
}
zi.f.a().v4((int) remoteAccount.f(), System.currentTimeMillis());
}
}
class o extends BroadcastReceiver {
o() {
}
@Override
public void onReceive(Context context, Intent intent) {
if (v.this.f12992nl == null) {
return;
}
v.this.f12992nl.g();
}
}
class p implements ViewPager.j {
final int f13020a = o7.i.f29671r - 2;
private boolean f13021b = false;
private float f13022c = 0.0f;
private float f13023d = 0.0f;
private long f13024e = -1;
private int f13025f = -1;
p() {
}
@Override
public void onPageScrollStateChanged(int i10) {
if (i10 != 0) {
if (i10 == 1) {
v.this.Yk = true;
return;
} else {
if (i10 == 2) {
v.this.Yk = false;
return;
}
return;
}
}
if (v.this.Yk && v.this.f12976ci.getCurrentItem() == 0 && v.this.f12999yk.v() != 5 && v.this.f12999yk.v() != 6) {
v.this.p3();
}
}
@Override
public void onPageScrolled(int i10, float f10, int i11) {
float f11;
if (v.this.getContext() != null && m0.r(v.this.getContext()).isLinkedAccount() && v.this.t2(i10) && i10 != this.f13025f) {
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_VIEW_OLD_TRANSACTION_LINKED_WALLET);
}
this.f13025f = i10;
if (v.this.Gk == null || v.this.Hk == null) {
return;
}
int i12 = this.f13020a;
float f12 = 0.0f;
if (i10 < i12) {
f10 = 0.0f;
} else if (i10 == i12) {
this.f13021b = false;
} else {
f10 = 1.0f;
this.f13021b = false;
}
if (this.f13021b) {
return;
}
if (this.f13024e == -1) {
this.f13024e = System.currentTimeMillis();
this.f13022c = 0.0f;
f11 = 0.0f;
} else {
float currentTimeMillis = (float) (System.currentTimeMillis() - this.f13024e);
float f13 = (f10 - this.f13023d) / currentTimeMillis;
f12 = (f13 - this.f13022c) / currentTimeMillis;
f11 = f13;
}
v.this.Gk.a(i10, f10, f12 * 1000.0f);
this.f13022c = f11;
this.f13023d = f10;
if (i10 != this.f13020a) {
this.f13021b = true;
this.f13024e = -1L;
}
}
@Override
public void onPageSelected(int i10) {
o7.i.f29676w = i10;
if (!v.this.isAdded()) {
return;
}
if (v.this.V2 != 6 && v.this.V2 != 5) {
int i11 = o7.i.f29675v;
if (i10 < i11) {
v.f12973ol = false;
v.this.f12974al.setVisibility(0);
v.this.f12974al.setImageResource(R.drawable.ic_gototoday_right);
MainActivity.Gk.M(true);
v.this.Y2();
} else if (i10 == i11) {
v.f12973ol = true;
v.this.f12974al.setVisibility(8);
v.this.Bk.setVisibility(8);
MainActivity.Gk.M(false);
} else {
v.f12973ol = false;
v.this.f12974al.setVisibility(0);
v.this.f12974al.setImageResource(R.drawable.ic_gototoday_left);
v.this.Bk.setVisibility(8);
MainActivity.Gk.M(false);
}
} else {
v.f12973ol = true;
v.this.f12974al.setVisibility(8);
v.this.Bk.setVisibility(8);
}
CharSequence f10 = v.this.f12999yk.f(v.this.f12976ci.getCurrentItem());
if (f10 == null) {
return;
}
MoneyApplication.f11024k0 = f10.toString();
}
}
public class q implements b.a {
final Calendar f13027a;
q(Calendar calendar) {
this.f13027a = calendar;
}
@Override
public void a() {
v.this.b3(6, this.f13027a);
}
}
public class r implements Runnable {
r() {
}
@Override
public void run() {
v vVar = v.this;
vVar.m3(vVar.K3);
v.this.Qk.setVisible(true);
v.this.Rk.setVisible(false);
}
}
interface s {
}
interface t {
void a(int i10, float f10, float f11);
}
public void A2(View view) {
k2();
}
private void A3() {
this.K3 = true;
zi.f.a().i6(this.K3);
this.f14716c.postDelayed(new r(), 100L);
Snackbar.make(this.f12976ci, R.string.cashbook_contentdescription_viewmode_category, -1).show();
}
public static void B2(View view) {
}
private void B3() {
this.K3 = false;
zi.f.a().i6(this.K3);
this.f14716c.postDelayed(new Runnable() {
@Override
public final void run() {
com.zoostudio.moneylover.main.transactions.v.this.V2();
}
}, 100L);
Snackbar.make(this.f12976ci, R.string.cashbook_contentdescription_viewmode_transaction, -1).show();
}
public void C2(View view) {
com.zoostudio.moneylover.main.a.Hk.v(1);
qe.a.l(getContext(), "c_wallet_switcher_v2", "cashbook", Boolean.TRUE);
if (!isAdded()) {
return;
}
if (m0.r(getContext()).isLinkedAccount()) {
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_CLICK_WALLET_PICKER);
} else {
y.b(com.zoostudio.moneylover.utils.v.WALLET_SWITCHER_CASHBOOK);
}
MainActivity.Gk.H(1);
t3();
}
private void C3() {
D3(0);
}
public void D2(View view) {
qj.c.C(getContext());
v3(false);
}
public void D3(int i10) {
if (isAdded() && getContext() != null) {
com.zoostudio.moneylover.adapter.item.a r10 = m0.r(getContext());
this.Kk = r10;
if ((r10.getId() == 0 || zi.f.a().L2()) && i10 != 1) {
m0.h(getContext(), new Runnable() {
@Override
public final void run() {
com.zoostudio.moneylover.main.transactions.v.this.W2();
}
});
} else {
h2(r10.getId());
}
}
}
public void E2(View view, View view2) {
e0.f(view);
qe.a.l(requireContext(), "c__upgrade_button", "screen name", "cashbook");
HashMap hashMap = new HashMap();
hashMap.put("screen name", "cashbook");
if (this.f12990me) {
hashMap.put("timing", "lock");
} else {
hashMap.put("timing", "delay time");
}
qe.a.k(requireContext(), "Upgrade Now Clicked", hashMap);
startActivity(ActivityPremiumStore.Ak.b(getContext(), 1));
}
public void E3(boolean z10) {
this.f12988kl = z10;
}
public static boolean F2(MenuItem menuItem) {
return true;
}
private void F3() {
zi.f.a().l5(1, true);
zi.f.a().l5(2, true);
il.a.f23703a.e("com.zoostudio.moneylover.utils.BroadcastActions.UPDATE_BANNER_NOTIFY_LW");
}
public boolean G2(MenuItem menuItem) {
r3();
return true;
}
private void G3(int i10) {
if (this.f12976ci == null) {
startActivity(new Intent(getContext(), (Class<?>) ActivitySplash.class));
}
if (i10 == this.f12976ci.getCurrentItem()) {
g3(i10 - 1);
}
this.f12995uk.getViewTreeObserver().addOnGlobalLayoutListener(new a(i10));
}
public boolean H2(MenuItem menuItem) {
c3();
return true;
}
private void H3() {
if (zi.f.a().t2() || !T1()) {
return;
}
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
com.zoostudio.moneylover.main.transactions.v.this.X2();
}
}, 350L);
}
public boolean I2(MenuItem menuItem) {
Snackbar.make(this.f12976ci, "TODO: Refresh account.", -1).show();
return true;
}
public boolean J2(MenuItem menuItem) {
y.b(com.zoostudio.moneylover.utils.v.DUP_CHECK_DUP);
l2();
return true;
}
public boolean K2(com.zoostudio.moneylover.adapter.item.a aVar, MenuItem menuItem) {
if (aVar.isLinkedAccount()) {
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_CLICK_SYNC_LINKED_WALLET);
}
F3();
qj.c.w(getContext());
z3();
return true;
}
public boolean L2(com.zoostudio.moneylover.adapter.item.a aVar, MenuItem menuItem) {
o2(aVar);
return true;
}
public boolean M2(com.zoostudio.moneylover.adapter.item.a aVar, MenuItem menuItem) {
j2(aVar);
return false;
}
public boolean N2(MenuItem menuItem) {
if (m0.r(getContext()).isLinkedAccount()) {
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_CLICK_CATE_LINKED_WALLET);
}
A3();
return true;
}
public boolean O2(MenuItem menuItem) {
if (m0.r(getContext()).isLinkedAccount()) {
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_CLICK_TRANSACTION_LINKED_WALLET);
}
B3();
return true;
}
public void P2() {
Snackbar.make(this.f12976ci, R.string.feedback_thanks_store, 0).show();
}
public void Q2() {
o3(m0.r(getContext()), true);
}
public void R2(View view) {
startActivity(ActivityPremiumStore.Ak.b(getContext(), 1));
}
public void S2(View view) {
i2();
}
private boolean T1() {
int a10 = fl.a.a();
if (a10 >= 4 && a10 <= 6 && zi.f.a().R() <= 2) {
return true;
}
return false;
}
public kn.v T2(com.zoostudio.moneylover.adapter.item.a aVar, l9.b bVar) {
a3(aVar, bVar);
return null;
}
private void U1() {
Window window = requireActivity().getWindow();
window.addFlags(Integer.MIN_VALUE);
window.clearFlags(67108864);
window.setStatusBarColor(com.zoostudio.moneylover.utils.n.c(requireActivity(), R.attr.colorSurface));
}
public void U2(boolean z10) {
CustomFontTextView customFontTextView = this.Ik.Q;
if (z10) {
customFontTextView.setVisibility(0);
} else {
customFontTextView.setVisibility(8);
}
}
private Boolean V1() {
Date date;
boolean z10;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MM-yyyy");
System.currentTimeMillis();
try {
date = simpleDateFormat.parse(MainActivity.Gk.l());
} catch (ParseException e10) {
e10.printStackTrace();
date = null;
}
if (System.currentTimeMillis() > date.getTime()) {
z10 = true;
} else {
z10 = false;
}
return Boolean.valueOf(z10);
}
public void V2() {
m3(this.K3);
this.Qk.setVisible(false);
this.Rk.setVisible(true);
}
private Boolean W1() {
Date date;
boolean z10;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy");
System.currentTimeMillis();
try {
date = simpleDateFormat.parse(MainActivity.Gk.m());
} catch (ParseException e10) {
e10.printStackTrace();
date = null;
}
if (System.currentTimeMillis() > date.getTime()) {
z10 = true;
} else {
z10 = false;
}
return Boolean.valueOf(z10);
}
public void W2() {
Context context = getContext();
if (context != null) {
o3(m0.r(context), true);
}
}
private void X1() {
if (zi.f.a().t2()) {
this.Ck.setVisibility(8);
this.Pk.setEnabled(true);
return;
}
if (zi.f.a().E1().equals(p004if.i.f23542i.c())) {
this.Ck.setVisibility(0);
this.Dk.setText(getString(R.string.rev800k__lock_app__banner, MainActivity.Gk.m()));
qe.a.l(requireContext(), "v__caution_delaytime", "screen name", "cashbook");
this.Pk.setEnabled(true);
this.f12990me = false;
if (W1().booleanValue()) {
this.Ck.setVisibility(8);
}
}
}
public void X2() {
if (isAdded() && getActivity() != null) {
new fl.a(getActivity().getSupportFragmentManager()).b(getContext());
}
}
private void Y1() {
if (zi.f.a().t2()) {
this.Ck.setVisibility(8);
this.Pk.setEnabled(true);
return;
}
if (zi.f.a().E1().equals(p004if.i.f23537c.c()) || zi.f.a().E1().equals(p004if.i.f23538d.c()) || zi.f.a().E1().equals(p004if.i.f23539e.c()) || zi.f.a().E1().equals(p004if.i.f23541g.c())) {
this.Ck.setVisibility(0);
if (V1().booleanValue()) {
if (!m0.r(getContext()).isGoalWallet()) {
f3(2);
this.f14716c.postDelayed(new Runnable() {
@Override
public final void run() {
com.zoostudio.moneylover.main.transactions.v.this.u2();
}
}, 200L);
this.f14716c.postDelayed(new Runnable() {
@Override
public final void run() {
com.zoostudio.moneylover.main.transactions.v.this.v2();
}
}, 300L);
this.f14716c.postDelayed(new Runnable() {
@Override
public final void run() {
com.zoostudio.moneylover.main.transactions.v.this.w2();
}
}, 400L);
}
this.Dk.setText(getString(R.string.rev800k__cashbook__caution_lock));
qe.a.l(requireContext(), "v__caution_lock", "screen name", "cashbook");
this.Pk.setEnabled(false);
SpannableString spannableString = new SpannableString(this.Pk.getTitle().toString());
spannableString.setSpan(new ForegroundColorSpan(com.zoostudio.moneylover.utils.n.c(requireContext(), android.R.attr.textColorSecondary)), 0, spannableString.length(), 0);
this.Pk.setTitle(spannableString);
this.f12990me = true;
return;
}
this.Dk.setText(getString(R.string.rev800k__cashbook__caution_delaytime, MainActivity.Gk.l()));
qe.a.l(requireContext(), "v__caution_delaytime", "screen name", "cashbook");
this.Pk.setEnabled(true);
this.f12990me = false;
}
}
public void Y2() {
if (zi.f.a().t2()) {
this.Bk.setVisibility(8);
return;
}
if (zi.f.a().E1().equals(p004if.i.f23537c.c()) || zi.f.a().E1().equals(p004if.i.f23538d.c()) || zi.f.a().E1().equals(p004if.i.f23539e.c()) || zi.f.a().E1().equals(p004if.i.f23541g.c())) {
if (V1().booleanValue()) {
this.Bk.setVisibility(0);
} else {
this.Bk.setVisibility(8);
}
}
}
private void Z1() {
zi.a a10 = zi.f.a();
String x12 = a10.x1();
boolean t22 = a10.t2();
boolean equals = Objects.equals(Long.valueOf(this.Kk.getId()), Long.valueOf(a10.S1()));
boolean isLinkedAccount = this.Kk.isLinkedAccount();
boolean isTotalAccount = this.Kk.isTotalAccount();
if (Objects.equals(x12, "end_trial") && !t22 && !equals && !isLinkedAccount && !isTotalAccount) {
this.Ik.f20856c.getRoot().setVisibility(0);
CustomFontTextView customFontTextView = this.Ik.f20856c.f22171b;
customFontTextView.setPaintFlags(customFontTextView.getPaintFlags() | 8);
return;
}
this.Ik.f20856c.getRoot().setVisibility(8);
}
private void a2() {
try {
try {
startActivity(new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=com.bookmark.money")));
} catch (ActivityNotFoundException unused) {
Snackbar.make(this.f12976ci, R.string.feedback_store_error, -1).show();
}
} catch (ActivityNotFoundException unused2) {
startActivity(new Intent("android.intent.action.VIEW", Uri.parse("http://play.google.com/store/apps/details?id=com.bookmark.money")));
}
r2();
}
private void a3(com.zoostudio.moneylover.adapter.item.a aVar, l9.b bVar) {
if (!aVar.getCurrency().b().equals(bVar.b())) {
MoneyApplication.A(getContext()).setDefaultCurrency(bVar);
if (aVar.getId() == 0) {
m0.h(getContext(), new Runnable() {
@Override
public final void run() {
com.zoostudio.moneylover.main.transactions.v.this.Q2();
}
});
}
il.a.f23703a.d(new Intent(com.zoostudio.moneylover.utils.j.WALLET.toString()));
}
}
private void b2() {
if (getContext() != null && getActivity() != null) {
y.C();
this.f13000zk.u();
r2();
if (MoneyApplication.H == 1) {
Intent intent = new Intent(getContext(), (Class<?>) ActivityCreateNewQuestion.class);
intent.putExtra(HelpsConstant.SEND.SHOW_TOAST_WHEN_SENT, false);
intent.putExtra(HelpsConstant.SEND.QUESTION_HINT, getContext().getString(R.string.helpdesk__question__feedback_content));
startActivityForResult(intent, 11);
return;
}
com.zoostudio.moneylover.help.utils.b.f(getContext(), getActivity().getSupportFragmentManager());
}
}
private int c2(com.zoostudio.moneylover.adapter.item.a aVar) {
if (aVar.isCredit()) {
return 2;
}
if (aVar.isGoalWallet()) {
return 5;
}
return e2().getInt(getString(R.string.pref_default_time_mode_key), 2);
}
private void c3() {
y3();
}
private void d2() {
if (!MoneyApplication.f11024k0.isEmpty()) {
return;
}
g3 g3Var = new g3(getContext(), m0.n(getContext()));
g3Var.d(new n7.f() {
@Override
public final void onDone(Object obj) {
com.zoostudio.moneylover.main.transactions.v.this.x2((Date) obj);
}
});
g3Var.b();
}
private void d3(com.zoostudio.moneylover.adapter.item.a aVar, boolean z10) {
int i10;
Context context = getContext();
if (context == null) {
return;
}
boolean K = zi.f.i().K();
boolean a10 = com.zoostudio.moneylover.utils.o.a(context);
MenuItem menuItem = this.Rk;
if (menuItem == null) {
return;
}
menuItem.setVisible(!this.K3);
this.Qk.setVisible(this.K3);
this.Sk.setVisible(aVar.getPolicy().a());
this.Tk.setVisible(aVar.getPolicy().k().b());
this.Uk.setVisible(zi.f.i().t());
this.Nk.setShowAsActionFlags(2);
if (z10) {
this.Pk.setShowAsActionFlags(0);
this.Qk.setShowAsActionFlags(0);
this.Rk.setShowAsActionFlags(0);
this.Sk.setShowAsActionFlags(0);
this.Tk.setShowAsActionFlags(0);
this.Uk.setShowAsActionFlags(0);
this.Vk.setShowAsActionFlags(0);
this.Wk.setShowAsActionFlags(0);
} else {
this.Pk.setShowAsActionFlags(a10 ? 1 : 0);
this.Qk.setShowAsActionFlags(a10 ? 1 : 0);
this.Rk.setShowAsActionFlags(a10 ? 1 : 0);
this.Sk.setShowAsActionFlags(a10 ? 1 : 0);
this.Tk.setShowAsActionFlags(a10 ? 1 : 0);
this.Uk.setShowAsActionFlags(a10 ? 1 : 0);
this.Vk.setShowAsActionFlags(a10 ? 1 : 0);
this.Wk.setShowAsActionFlags(a10 ? 1 : 0);
}
if (aVar.isCredit()) {
this.Pk.setVisible(false);
} else {
this.Pk.setVisible(!aVar.isGoalWallet());
}
this.Vk.setVisible(false);
MenuItem menuItem2 = this.Uk;
if (K) {
i10 = R.string.not_sync_sign;
} else {
i10 = R.string.synchronize;
}
menuItem2.setTitle(i10);
}
private void e3(com.zoostudio.moneylover.adapter.item.a aVar) {
int z02 = z0();
if (z02 != 1) {
if (z02 == 2) {
d3(aVar, true);
return;
}
return;
}
d3(aVar, false);
}
private void f3(int i10) {
SharedPreferences.Editor edit = e2().edit();
edit.putInt(getString(R.string.pref_default_time_mode_key), i10);
edit.apply();
}
private int g2() {
if (getContext() == null) {
return -1;
}
return androidx.preference.j.b(getContext()).getInt(getString(R.string.pref_default_time_mode_key), 2);
}
private void g3(int i10) {
this.f12976ci.O(i10, true);
TabLayout tabLayout = this.f12995uk;
if (tabLayout != null) {
tabLayout.postDelayed(new f(i10), 100L);
}
}
public void h2(long j10) {
t9.m1 m1Var = new t9.m1(getContext(), j10);
m1Var.d(new n7.f() {
@Override
public final void onDone(Object obj) {
com.zoostudio.moneylover.main.transactions.v.this.y2((com.zoostudio.moneylover.adapter.item.a) obj);
}
});
m1Var.b();
}
private void h3(com.zoostudio.moneylover.adapter.item.a aVar) {
if (aVar.isTotalAccount()) {
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_LOAD_TOTAL_WALLET_COLD_START);
return;
}
if (aVar.isBasicAccount()) {
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_LOAD_BASIC_WALLET_COLD_START);
return;
}
if (aVar.isGoalWallet()) {
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_LOAD_GOAL_WALLET_COLD_START);
return;
}
if (aVar.isLinkedAccount()) {
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_LOAD_LINKED_WALLET_COLD_START);
i3(g2());
} else if (aVar.isCredit()) {
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_LOAD_CREDIT_WALLET_COLD_START);
}
}
private void i2() {
String str;
if (rt.e.a(requireActivity(), "vi")) {
str = "https://note.moneylover.vn/nhung-tinh-nang-con-lai-khi-het-han-dung-thu-mien-phi/";
} else {
str = "https://note.moneylover.me/remaining-features-after-free-trial-expiration/";
}
startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
}
private void i3(int i10) {
switch (i10) {
case 0:
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_LOADING_LINKED_WALLET_DAY_COLD_START);
return;
case 1:
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_LOADING_LINKED_WALLET_WEEK_COLD_START);
return;
case 2:
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_LOADING_LINKED_WALLET_MONTH_COLD_START);
return;
case 3:
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_LOADING_LINKED_WALLET_QUARTER_COLD_START);
return;
case 4:
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_LOADING_LINKED_WALLET_YEAR_COLD_START);
return;
case 5:
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_LOADING_LINKED_WALLET_ALL_COLD_START);
return;
case 6:
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_LOADING_LINKED_WALLET_CUSTOM_COLD_START);
return;
default:
return;
}
}
private void j2(com.zoostudio.moneylover.adapter.item.a aVar) {
qe.a.j(getContext(), "click_share_wallets");
if (getContext() == null) {
return;
}
if (aVar.isTotalAccount() || aVar.isLinkedAccount()) {
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_CLICK_SHARE_WALLET_LINKED_WALLET);
}
y.b(com.zoostudio.moneylover.utils.v.CLICK_ADD_USER_FROM_CASHBOOK);
Intent intent = new Intent(getContext(), (Class<?>) ActivityShareWalletV2.class);
intent.putExtra("EXTRA_WALLET", m0.s(getContext()));
G(intent, R.anim.slide_in_bottom, R.anim.hold);
}
private void j3() {
this.Ik.f20856c.f22172c.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
com.zoostudio.moneylover.main.transactions.v.this.R2(view);
}
});
this.Ik.f20856c.f22171b.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
com.zoostudio.moneylover.main.transactions.v.this.S2(view);
}
});
}
private void k3(boolean z10) {
o7.i iVar = new o7.i(getContext(), getChildFragmentManager(), z10);
this.f12999yk = iVar;
iVar.B(this.V2);
}
private void l2() {
startActivity(DuplicateTransactionActivity.L.a(getContext(), m0.n(getContext())));
}
private void l3(Bundle bundle) {
int i10;
this.f12976ci.setPageMargin(getResources().getDimensionPixelOffset(R.dimen.spacing_medium));
this.f12976ci.setAdapter(this.f12999yk);
this.f12995uk.setupWithViewPager(this.f12976ci);
if (bundle != null) {
if (bundle.containsKey(FirebaseAnalytics.Param.INDEX) && bundle.containsKey("scroll_index")) {
i10 = bundle.getInt(FirebaseAnalytics.Param.INDEX);
if (i10 == 0) {
i10 = o7.i.f29675v;
}
} else {
i10 = o7.i.f29675v;
}
} else {
i10 = o7.i.f29675v;
}
if (this.f12999yk.v() != 5 && this.f12999yk.v() != 6) {
if (!MoneyApplication.f11024k0.isEmpty()) {
i10 = this.f12999yk.u(MoneyApplication.f11024k0);
}
} else {
i10 = 0;
}
TabLayout.Tab tabAt = this.f12995uk.getTabAt(i10);
AddFirstWalletV4Activity.a aVar = AddFirstWalletV4Activity.H;
if (aVar.a()) {
i10 = o7.i.f29673t - 2;
aVar.b(false);
}
if (tabAt != null) {
tabAt.select();
if (tabAt.getText().equals(getText(R.string.future_plan))) {
i10--;
}
}
this.f12976ci.O(i10, true);
this.f12995uk.setScrollPosition(i10, 0.0f, true);
this.f12999yk.j();
this.f12976ci.c(this.f12986jl);
}
public static Intent m2(Context context, com.zoostudio.moneylover.adapter.item.a aVar, boolean z10) {
if (aVar == null) {
return null;
}
if (z10) {
Intent intent = new Intent(context, (Class<?>) ActivityInputInterest.class);
intent.putExtra("EXTRA_CURRENCY", aVar.getCurrency());
return intent;
}
Intent intent2 = new Intent(context, (Class<?>) ActivityEditTransaction.class);
intent2.putExtra("KEY_TRANSACTION_TYPE", 2);
double d10 = 0.0d;
if (aVar.getBalance() < 0.0d) {
d10 = -aVar.getBalance();
}
intent2.putExtra("KEY_INIT_AMOUNT", d10);
intent2.putExtra("KEY_INTEREST_AMOUNT", 0);
intent2.putExtra("ActivityEditTransaction.EXTRA_WALLET", aVar);
return intent2;
}
private void n2(int i10) {
if (this.f12999yk.w()) {
boolean x10 = this.f12999yk.x();
com.zoostudio.moneylover.adapter.item.a r10 = m0.r(getContext());
boolean isShowFutureTab = r10.isShowFutureTab();
this.V2 = c2(r10);
o7.i iVar = new o7.i(getContext(), getChildFragmentManager(), isShowFutureTab);
this.f12999yk = iVar;
iVar.D(x10);
this.f12999yk.B(this.V2);
this.f12976ci.setAdapter(this.f12999yk);
}
g3(i10);
}
private String n3(String str) {
if (str.length() >= 24) {
return str.substring(0, 23) + "...";
}
return str;
}
private void o2(com.zoostudio.moneylover.adapter.item.a aVar) {
if (jd.b.f25352a.b(aVar) && getContext() != null) {
jd.b.c(getContext());
return;
}
Intent intent = new Intent(getContext(), (Class<?>) ActivityEditWallet.class);
intent.putExtra("WALLET_TYPE", aVar.getAccountType());
intent.putExtra("com.zoostudio.moneylover.ui.AddAccountActivity.ACCOUNT", aVar);
intent.putExtra("com.zoostudio.moneylover.ui.AddAccountActivity.REQUEST_ACTION", 2);
G(intent, R.anim.slide_in_bottom, R.anim.hold);
}
private void o3(final com.zoostudio.moneylover.adapter.item.a aVar, boolean z10) {
double balance;
try {
this.f12998xk = this.Ik.T;
this.f12998xk.setText(n3(aVar.getName()));
if (this.f12978df == 0.0d) {
balance = aVar.getBalance();
} else if (zi.f.a().a1(0) == 1) {
balance = com.zoostudio.moneylover.main.transactions.a.Z.a();
} else {
balance = aVar.getBalance() + com.zoostudio.moneylover.main.transactions.a.Z.b();
}
if (aVar.isRemoteAccount() && aVar.getRemoteAccount().n()) {
balance = aVar.getRemoteAccount().c();
}
if (balance <= 9.99999999E8d && balance >= -9.99999999E8d) {
this.f12997wk.h(zi.f.a().w2());
this.f12997wk.i(true).k(true).e(aVar.isNeedShowApproximate()).d(balance, aVar.getCurrency());
if (!z10) {
this.f12996vk.setImageResource(R.drawable.ic_category_all);
} else {
this.f12996vk.setIconByName(aVar.getIcon());
}
if (!jd.b.f25352a.b(aVar) && !aVar.isLinkedAccount()) {
this.Ik.f20865q.setVisibility(0);
} else {
this.Ik.f20865q.setVisibility(8);
}
if (aVar.getListCurrency().size() <= 1) {
u0 a10 = u0.f28633c.a(aVar.getListCurrency(), aVar.getCurrency());
this.f12975bl = a10;
a10.v(new wn.l() {
@Override
public final Object invoke(Object obj) {
kn.v T2;
T2 = com.zoostudio.moneylover.main.transactions.v.this.T2(aVar, (l9.b) obj);
return T2;
}
});
return;
}
return;
}
this.f12997wk.h(true);
this.f12997wk.i(true).k(true).e(aVar.isNeedShowApproximate()).d(balance, aVar.getCurrency());
if (!z10) {
}
if (!jd.b.f25352a.b(aVar)) {
}
this.Ik.f20865q.setVisibility(8);
if (aVar.getListCurrency().size() <= 1) {
}
} catch (Exception e10) {
FirebaseCrashlytics.getInstance().recordException(e10);
}
}
private void p2() {
if (!this.f12999yk.w()) {
boolean x10 = this.f12999yk.x();
this.V2 = c2(m0.r(getContext()));
o7.i iVar = new o7.i(getContext(), getChildFragmentManager(), false, this.Xk, this.V2);
this.f12999yk = iVar;
iVar.z(!r1.isRemoteAccount());
this.f12999yk.A(this.V2);
this.f12999yk.D(x10);
this.f12976ci.setAdapter(this.f12999yk);
}
g3(o7.i.f29672s);
}
public void p3() {
Calendar calendar = Calendar.getInstance();
int v10 = this.f12999yk.v();
if (v10 != 0) {
if (v10 != 1) {
if (v10 != 2) {
if (v10 != 3) {
if (v10 == 4) {
calendar.add(1, -18);
}
} else {
calendar.add(2, -54);
}
} else {
calendar.add(2, -18);
}
} else {
calendar.add(3, -18);
}
} else {
calendar.add(6, -18);
}
v9.b bVar = new v9.b();
bVar.u(new q(calendar));
bVar.show(getChildFragmentManager(), "");
}
public void q2(int i10) {
if (!isAdded()) {
return;
}
com.zoostudio.moneylover.adapter.item.a r10 = m0.r(getContext());
if ((i10 <= 20 && i10 >= 0) || (!r10.isArchived() && !r10.isRemoteAccount())) {
n2(i10);
} else {
p2();
}
}
private void r2() {
m1 m1Var = this.f12981fl;
if (m1Var != null) {
m1Var.dismiss();
}
zi.f.a().A5(1);
this.f12983hl = false;
}
private void r3() {
com.zoostudio.moneylover.adapter.item.a s10 = m0.s(getContext());
if (s10 != null && !s10.getPolicy().a()) {
s10 = null;
}
G(ActivityAdjustBalanceV2.t1(getContext(), s10), R.anim.slide_in_bottom, R.anim.hold);
if (!com.zoostudio.moneylover.utils.o.a(getContext()) || getActivity() == null) {
return;
}
getActivity().overridePendingTransition(0, 0);
}
private void s2(final com.zoostudio.moneylover.adapter.item.a aVar) {
boolean z10;
this.Ik.L.e();
boolean z11 = false;
MenuItem b10 = this.Ik.L.b(0, R.string.notification_center_title, R.drawable.ic_search, null);
this.Nk = b10;
b10.setActionView(R.layout.view_action_layout_search);
this.Nk.expandActionView();
this.Nk.getActionView().setOnClickListener(new c());
MenuItem b11 = this.Ik.L.b(3, R.string.cashbook_contentdescription_select_time_range_to_view, R.drawable.ic_calendar, new MenuItem.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
boolean F2;
F2 = com.zoostudio.moneylover.main.transactions.v.F2(menuItem);
return F2;
}
});
this.Pk = b11;
b11.setActionView(R.layout.view_actionlayout_changetimerange);
this.Pk.expandActionView();
this.Pk.getActionView().setOnClickListener(new d());
this.Pk.setOnMenuItemClickListener(new e());
this.Qk = this.Ik.L.b(4, R.string.cashbook_contentdescription_viewmode_transaction, R.drawable.ic_view_by_time, this.Fk);
this.Rk = this.Ik.L.b(5, R.string.cashbook_contentdescription_viewmode_category, R.drawable.ic_view_by_category, this.Ek);
this.Sk = this.Ik.L.b(6, R.string.adjustment, R.drawable.ic_edit, new MenuItem.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
boolean G2;
G2 = com.zoostudio.moneylover.main.transactions.v.this.G2(menuItem);
return G2;
}
});
this.Tk = this.Ik.L.b(10, R.string.transfer_money_amount_title, R.drawable.ic_transfer_money, new MenuItem.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
boolean H2;
H2 = com.zoostudio.moneylover.main.transactions.v.this.H2(menuItem);
return H2;
}
});
this.Vk = this.Ik.L.b(12, R.string.remote_account__action__request_update, R.drawable.ic_sync, new MenuItem.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
boolean I2;
I2 = com.zoostudio.moneylover.main.transactions.v.this.I2(menuItem);
return I2;
}
});
if (FirebaseRemoteConfig.getInstance().getBoolean("duplicate_transaction") && aVar.isRemoteAccount()) {
this.Ik.L.b(7, R.string.dup__check_transaction, R.drawable.ic_search_dim, new MenuItem.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
boolean J2;
J2 = com.zoostudio.moneylover.main.transactions.v.this.J2(menuItem);
return J2;
}
});
}
this.Uk = this.Ik.L.b(8, R.string.synchronize, R.drawable.ic_sync, new MenuItem.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
boolean K2;
K2 = com.zoostudio.moneylover.main.transactions.v.this.K2(aVar, menuItem);
return K2;
}
});
this.Wk = this.Ik.L.b(9, R.string.edit_wallet, R.drawable.ic_edit, new MenuItem.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
boolean L2;
L2 = com.zoostudio.moneylover.main.transactions.v.this.L2(aVar, menuItem);
return L2;
}
});
MenuItem b12 = this.Ik.L.b(12, R.string.backup_share, R.drawable.ic_add_user, new MenuItem.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
boolean M2;
M2 = com.zoostudio.moneylover.main.transactions.v.this.M2(aVar, menuItem);
return M2;
}
});
this.Ok = b12;
if (FirebaseRemoteConfig.getInstance().getBoolean("fe_family_plan") && m0.r(getContext()).getId() > 0 && !zg.a.a(getContext())) {
z10 = true;
} else {
z10 = false;
}
b12.setVisible(z10);
this.f12989ll = true;
ql.d policy = m0.r(getContext()).getPolicy();
if (policy.i().a()) {
this.Tk.setVisible(true);
}
MenuItem menuItem = this.Wk;
if (!zi.f.a().L2() && policy.l().c()) {
z11 = true;
}
menuItem.setVisible(z11);
}
public void s3(Calendar calendar) {
Bundle bundle = new Bundle();
long T0 = d1.T0();
if (calendar == null) {
if (T0 <= 0) {
T0 = new Date().getTime();
}
} else {
T0 = calendar.getTimeInMillis();
}
long Q = d1.Q();
if (Q <= 0) {
Q = new Date().getTime();
}
bundle.putLong("START DATE", T0);
bundle.putLong("END DATE", Q);
v0 v0Var = new v0();
v0Var.J(this);
v0Var.setArguments(bundle);
v0Var.setCancelable(false);
v0Var.show(getChildFragmentManager(), "");
}
public boolean t2(int i10) {
if (i10 < o7.i.f29671r - 2) {
return true;
}
return false;
}
private void t3() {
if (!isAdded()) {
return;
}
G(new Intent(getContext(), (Class<?>) ActivityWalletSwitcher.class), R.anim.slide_in_bottom, R.anim.hold);
}
public void u2() {
this.f12999yk.B(2);
}
private void u3() {
v3(zi.f.i().Z0());
}
public void v2() {
this.f12976ci.O(o7.i.f29675v - 1, true);
}
private void v3(final boolean z10) {
if (!isAdded()) {
return;
}
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
com.zoostudio.moneylover.main.transactions.v.this.U2(z10);
}
}, 370L);
}
public void w2() {
this.f12976ci.O(o7.i.f29675v, true);
}
public void w3(View view) {
if (getContext() == null) {
return;
}
if (m0.r(getContext()).isGoalWallet()) {
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_CLICK_TIME_RANGER_LINKED_WALLET);
}
this.Ak.d(androidx.preference.j.b(getContext()).getInt(getString(R.string.pref_default_time_mode_key), 2));
this.f12993th.setAnchorView(view);
this.f12993th.setOnItemClickListener(new g());
this.f12993th.show();
h0.l(this.f12993th);
this.Ak.notifyDataSetChanged();
}
public void x2(Date date) {
if (!isAdded()) {
return;
}
if (date == null) {
G3(o7.i.f29675v);
} else if (date.getTime() > System.currentTimeMillis()) {
G3(o7.i.f29675v + 1);
} else {
this.Xk = date.getTime();
G3(o7.i.f29675v + d1.I(new Date(), date, this.V2));
}
}
public void x3() {
if (getContext() == null) {
return;
}
if (m0.r(getContext()).isLinkedAccount()) {
el.a.a(com.zoostudio.moneylover.utils.v.CASHBOOK_CLICK_SEARCH_LINKED_WALLET);
}
G(new Intent(getContext(), (Class<?>) ActivitySearchSimple.class), R.anim.slide_in_bottom, R.anim.hold);
}
public void y2(com.zoostudio.moneylover.adapter.item.a aVar) {
boolean z10;
if (aVar == null) {
return;
}
this.Kk = aVar;
if (aVar.getId() == 0) {
z10 = true;
} else {
z10 = false;
}
o3(aVar, z10);
}
private void y3() {
ue.a.c(getContext(), this.Kk);
}
public void z2(View view) {
HashMap hashMap = new HashMap();
hashMap.put("screen name", "cashbook");
if (this.f12990me) {
hashMap.put("timing", "lock");
} else {
hashMap.put("timing", "delay time");
}
qe.a.k(requireContext(), "Learn More Clicked", hashMap);
if (this.f12990me) {
qe.a.l(requireContext(), "c__question_button_lock", "screen name", "cashbook");
} else {
qe.a.l(requireContext(), "c__question_button_delaytime", "screen name", "cashbook");
}
if (zi.f.a().E1().equals(p004if.i.f23542i.c())) {
startActivity(new Intent(getContext(), (Class<?>) ActivityFAQLockApp.class));
} else {
startActivity(new Intent(getContext(), (Class<?>) ActivityFAQV2.class));
}
}
private void z3() {
Context context = getContext();
if (context == null) {
return;
}
zi.f.i().X0(true);
qj.c.H(context, true);
}
@Override
public void B0() {
super.B0();
}
@Override
public void D0() {
super.D0();
this.f14716c.postDelayed(new h(), 200L);
}
@Override
public String M() {
return "TransactionsManagerFragment";
}
@Override
public void Q() {
super.Q();
}
@Override
public void R(Bundle bundle) {
super.R(bundle);
ArrayList arrayList = new ArrayList(Arrays.asList(getResources().getStringArray(R.array.cashbook_set_timerange_items)));
V1();
this.Ak = new w0(getContext(), arrayList);
this.f12993th = h0.i(getContext(), this.Ak, 3.5f);
com.zoostudio.moneylover.adapter.item.a r10 = m0.r(getContext());
boolean isShowFutureTab = r10.isShowFutureTab();
this.V2 = c2(r10);
k3(isShowFutureTab);
if (bundle == null) {
d2();
}
if (r10.isCredit()) {
y.b(com.zoostudio.moneylover.utils.v.CW_TRANSACTION_DISPLAY);
} else if (r10.isGoalWallet()) {
y.b(com.zoostudio.moneylover.utils.v.GW_TRANSACTIONS_DISPLAY);
}
this.K3 = zi.f.a().N2();
}
@Override
public void S(Bundle bundle) {
super.S(bundle);
this.f13000zk = zi.f.d();
if (getContext() == null) {
this.V1 = R.color.transparent;
this.C2 = R.color.transparent;
} else {
this.V1 = androidx.core.content.a.getColor(getContext(), R.color.p_500);
this.C2 = androidx.core.content.a.getColor(getContext(), R.color.deep_purple);
}
this.Ek = new MenuItem.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
boolean N2;
N2 = com.zoostudio.moneylover.main.transactions.v.this.N2(menuItem);
return N2;
}
};
this.Fk = new MenuItem.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
boolean O2;
O2 = com.zoostudio.moneylover.main.transactions.v.this.O2(menuItem);
return O2;
}
};
}
@Override
public void X(Bundle bundle) {
boolean z10;
super.X(bundle);
try {
this.K2 = 2;
com.zoostudio.moneylover.adapter.item.a r10 = m0.r(requireContext());
C3();
s2(r10);
d3(r10, false);
MenuItem menuItem = this.Wk;
if (menuItem != null) {
if (!zi.f.a().L2() && m0.r(getContext()).getPolicy().i().a() && !jd.b.f25352a.b(r10)) {
z10 = true;
} else {
z10 = false;
}
menuItem.setVisible(z10);
}
if (r10.isGoalWallet()) {
f12973ol = true;
this.f12974al.setVisibility(8);
this.Bk.setVisibility(8);
} else {
int i10 = this.V2;
if (i10 != 6 && i10 != 5) {
if (this.f12976ci.getCurrentItem() < o7.i.f29675v) {
f12973ol = false;
this.f12974al.setVisibility(0);
this.f12974al.setImageResource(R.drawable.ic_gototoday_right);
Y2();
MainActivity.Gk.M(true);
} else if (this.f12976ci.getCurrentItem() == o7.i.f29675v) {
f12973ol = true;
this.f12974al.setVisibility(8);
this.Bk.setVisibility(8);
MainActivity.Gk.M(false);
} else if (this.f12976ci.getCurrentItem() > o7.i.f29675v) {
f12973ol = false;
this.f12974al.setVisibility(0);
this.f12974al.setImageResource(R.drawable.ic_gototoday_left);
this.Bk.setVisibility(8);
MainActivity.Gk.M(false);
}
}
f12973ol = true;
this.f12974al.setVisibility(8);
this.Bk.setVisibility(8);
}
k3(r10.isShowFutureTab());
if (r10.isRemoteAccount()) {
d2();
}
l3(null);
} catch (Exception e10) {
FirebaseCrashlytics.getInstance().recordException(e10);
}
}
@Override
public void Y() {
super.Y();
u3();
C3();
}
@Override
protected void Z() {
}
@Override
public void onLoadFinished(androidx.loader.content.b<SpecialEvent> bVar, SpecialEvent specialEvent) {
}
@Override
protected void a0(Intent intent) {
}
@Override
public void b(Calendar calendar, Calendar calendar2) {
if (calendar.getTimeInMillis() >= calendar2.getTimeInMillis()) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle(R.string.dialog__title__uh_oh);
builder.setMessage(R.string.create_budget_message_select_day_error);
builder.setPositiveButton(R.string.try_again, new j());
builder.show();
}
f3(6);
this.V2 = 6;
this.Ak.d(6);
zi.f.a().J5(calendar.getTimeInMillis());
zi.f.a().v3(calendar2.getTimeInMillis());
this.f12999yk.B(6);
this.f12999yk.y();
this.f12995uk.setupWithViewPager(this.f12976ci);
this.f12995uk.getViewTreeObserver().addOnGlobalLayoutListener(new k());
}
public void b3(int i10, Calendar calendar) {
if (i10 >= this.Ak.getCount()) {
i10 = 0;
}
int i11 = this.V2;
if (i11 == i10 && i11 != 6) {
return;
}
this.f12999yk.z(m0.r(getContext()).isShowFutureTab());
if (i10 != 0) {
if (i10 != 1) {
if (i10 != 2) {
if (i10 != 3) {
if (i10 != 4) {
if (i10 != 6) {
qe.a.l(requireContext(), "c_time_range", "cashbook", "all");
this.f12999yk.B(5);
f12973ol = true;
this.f12974al.setVisibility(8);
} else {
qe.a.l(requireContext(), "c_time_range", "cashbook", "custom");
s3(calendar);
f12973ol = true;
this.f12974al.setVisibility(8);
return;
}
} else {
qe.a.l(requireContext(), "c_time_range", "cashbook", "year");
this.f12999yk.B(4);
}
} else {
qe.a.l(requireContext(), "c_time_range", "cashbook", "quarter");
this.f12999yk.B(3);
}
} else {
qe.a.l(requireContext(), "c_time_range", "cashbook", "month");
this.f12999yk.B(2);
}
} else {
qe.a.l(requireContext(), "c_time_range", "cashbook", "week");
this.f12999yk.B(1);
}
} else {
qe.a.l(requireContext(), "c_time_range", "cashbook", "day");
this.f12999yk.B(0);
}
this.V2 = i10;
this.Ak.d(i10);
f3(this.V2);
this.f12995uk.setupWithViewPager(this.f12976ci);
g3(o7.i.f29675v);
d2();
}
@Override
public void c0(Bundle bundle) {
super.c0(bundle);
if (bundle == null || bundle.getLong(com.zoostudio.moneylover.utils.h.ITEM_ID.toString(), 0L) == 0) {
return;
}
C3();
}
@Override
public void d0(Bundle bundle) {
super.d0(bundle);
s2(m0.r(getContext()));
if (bundle != null && bundle.containsKey("tab_future")) {
D3(bundle.getInt("tab_future"));
} else {
C3();
}
e3(m0.r(getContext()));
}
@Override
public void e() {
y.D();
if (!zi.f.a().t2() && !zi.f.a().v2()) {
this.f13000zk.B(14);
} else {
this.f13000zk.B(30);
}
r2();
}
protected SharedPreferences e2() {
return androidx.preference.j.b(getContext());
}
public int f2() {
CashbookViewPager cashbookViewPager = this.f12976ci;
if (cashbookViewPager != null) {
return cashbookViewPager.getCurrentItem();
}
return o7.i.f29675v;
}
@Override
public HashMap<String, BroadcastReceiver> g0(HashMap<String, BroadcastReceiver> hashMap) {
hashMap.put(com.zoostudio.moneylover.utils.j.UPDATE_TOTAL_ACCOUNT_BALANCE.toString(), this.Lk);
hashMap.put("com.zoostudio.moneylover.utils.BroadcastActions.UPDATE_OVER_DUE_CREDIT", this.Mk);
hashMap.put("com.zoostudio.moneylover.utils.BroadcastActions.SERVER_MAINTAIN", this.f12977cl);
hashMap.put("com.zoostudio.moneylover.utils.BroadcastActions.SHOW_SNACKBAR_WAIT_UPDATE_CSV", this.f12979dl);
hashMap.put("com.zoostudio.moneylover.utils.BroadcastActions.UPDATE_NOTIF_BADGE", this.f12980el);
return super.g0(hashMap);
}
@Override
public void k0(Bundle bundle) {
int i10;
if (getContext() == null) {
return;
}
super.k0(bundle);
FloatingActionButton floatingActionButton = this.Ik.f20858e;
this.f12974al = floatingActionButton;
floatingActionButton.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
com.zoostudio.moneylover.main.transactions.v.this.A2(view);
}
});
this.Zk = true;
la laVar = this.Ik;
this.f12994tk = laVar.f20855b;
this.f12995uk = laVar.H;
this.f12976ci = laVar.C;
this.A1 = laVar.L;
h0.m(getContext(), this.f12994tk, R.dimen.elevation_4);
h0.n(this.A1, 0.0f);
final View inflate = LayoutInflater.from(getContext()).inflate(R.layout.view_toolbar_transaction, (ViewGroup) null);
la laVar2 = this.Ik;
this.Bk = laVar2.f20864p.f22421b;
this.Ck = laVar2.f20861i;
this.Dk = laVar2.M;
this.f12996vk = laVar2.R;
this.f12997wk = (AmountColorTextView) inflate.findViewById(R.id.balanceTrans);
this.Ik.L.setCustomView(inflate);
l3(bundle);
if (!m0.r(getContext()).isGoalWallet() && (i10 = this.V2) != 5 && i10 != 6) {
if (this.f12976ci.getCurrentItem() < o7.i.f29675v) {
f12973ol = false;
this.f12974al.setVisibility(0);
this.f12974al.setImageResource(R.drawable.ic_gototoday_right);
Y2();
MainActivity.Gk.M(true);
} else if (this.f12976ci.getCurrentItem() == o7.i.f29675v) {
f12973ol = true;
this.f12974al.setVisibility(8);
this.Bk.setVisibility(8);
MainActivity.Gk.M(false);
} else if (this.f12976ci.getCurrentItem() > o7.i.f29675v) {
f12973ol = false;
this.f12974al.setVisibility(0);
this.f12974al.setImageResource(R.drawable.ic_gototoday_left);
this.Bk.setVisibility(8);
MainActivity.Gk.M(false);
}
} else {
f12973ol = true;
this.f12974al.setVisibility(8);
this.Bk.setVisibility(8);
}
this.Bk.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
com.zoostudio.moneylover.main.transactions.v.B2(view);
}
});
j3();
this.Ik.f20859f.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
com.zoostudio.moneylover.main.transactions.v.this.C2(view);
}
});
com.zoostudio.moneylover.adapter.item.a r10 = m0.r(getContext());
if (r10.isRemoteAccount()) {
d2();
}
this.Ik.Q.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
com.zoostudio.moneylover.main.transactions.v.this.D2(view);
}
});
this.Ik.f20860g.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
com.zoostudio.moneylover.main.transactions.v.this.E2(inflate, view);
}
});
this.Ik.f20863o.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
com.zoostudio.moneylover.main.transactions.v.this.z2(view);
}
});
s2(r10);
e3(r10);
getLoaderManager().c(1, null, this).forceLoad();
H3();
}
protected void k2() {
this.f12976ci.O(o7.i.f29675v, true);
if (getContext() != null) {
Snackbar.make(this.f12976ci, R.string.goto_today, -1).show();
}
}
@Override
public void l(int i10) {
if (i10 != R.id.btnRateNow) {
if (i10 == R.id.btnReview) {
b2();
}
} else {
y.E();
a2();
}
}
protected void m3(boolean z10) {
this.f12999yk.D(z10);
G3(this.f12995uk.getSelectedTabPosition());
}
@Override
public int o0() {
return 0;
}
@Override
public void onActivityResult(int i10, int i11, Intent intent) {
super.onActivityResult(i10, i11, intent);
if (i10 == 11 && i11 == -1) {
this.f14716c.postDelayed(new b(), 850L);
}
}
@Override
public void onCreate(Bundle bundle) {
if (getContext() != null) {
h3(m0.r(getContext()));
}
this.C1 = AnimationUtils.loadAnimation(requireContext(), R.anim.fade_in_floating);
this.K1 = AnimationUtils.loadAnimation(requireContext(), R.anim.fade_out_floating);
if (getContext() instanceof s) {
this.Hk = (s) getContext();
}
super.onCreate(bundle);
}
@Override
public androidx.loader.content.b<SpecialEvent> onCreateLoader(int i10, Bundle bundle) {
return new SpecialEventLoader(getActivity());
}
@Override
public void onLoaderReset(androidx.loader.content.b<SpecialEvent> bVar) {
}
@Override
public void onResume() {
super.onResume();
U1();
this.Zk = true;
MainActivity.Gk.x(false);
C3();
Y1();
X1();
Z1();
if (zi.f.a().q1(0) == 1) {
zi.f.a().A5(2);
}
try {
zi.f.f().D(m0.n(getContext()), 0);
} catch (JSONException e10) {
FirebaseCrashlytics.getInstance().recordException(e10);
}
if (this.f12982gl) {
this.f14716c.postDelayed(new Runnable() {
@Override
public final void run() {
com.zoostudio.moneylover.main.transactions.v.this.P2();
}
}, 850L);
this.f12982gl = false;
} else if (this.f12984id) {
this.f12984id = false;
if (this.f13000zk.A() && zi.f.a().q1(0) == 0) {
zi.f.a().A5(1);
q3();
}
}
if (zi.f.a().q1(0) == 2) {
zi.f.a().A5(0);
}
}
@Override
public void onStop() {
super.onStop();
this.Zk = false;
}
public void q3() {
if (FirebaseRemoteConfig.getInstance().getBoolean("nps_ask_nps")) {
return;
}
y.F("TransactionsManagerFragment");
if (this.f12981fl == null) {
m1 m1Var = new m1();
this.f12981fl = m1Var;
m1Var.w(this);
}
if (!this.f12983hl && getActivity() != null) {
this.f12983hl = true;
this.f13000zk.y();
this.f12981fl.show(getActivity().getSupportFragmentManager(), "");
}
}
@Override
protected int w0() {
return R.id.detail_panel;
}
@Override
protected ok.y x0(Bundle bundle) {
return z.q0(bundle);
}
@Override
protected View[] y0() {
return new View[]{this.f12994tk, this.f12976ci};
}
@Override
public View z() {
this.Ik = la.c(LayoutInflater.from(requireContext()));
this.Jk = ni.c(LayoutInflater.from(requireContext()));
return this.Ik.getRoot();
}
}