正在查看: Mint v5.7.3 应用的 HomeActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mint v5.7.3 应用的 HomeActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.htmedia.mint.ui.activity;
import android.app.Activity;
import android.app.ActivityOptions;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.PorterDuff;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcelable;
import android.text.Html;
import android.text.SpannableString;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.TextView;
import android.widget.Toast;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.appcompat.widget.Toolbar;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat;
import androidx.core.content.res.ResourcesCompat;
import androidx.core.view.MenuItemCompat;
import androidx.databinding.DataBindingUtil;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager.widget.ViewPager;
import androidx.viewpager2.widget.ViewPager2;
import androidx.work.OneTimeWorkRequest;
import androidx.work.WorkManager;
import b7.f;
import com.comscore.Analytics;
import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.admanager.AdManagerAdRequest;
import com.google.android.gms.ads.admanager.AdManagerAdView;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.bottomnavigation.BottomNavigationMenuView;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.navigation.NavigationView;
import com.google.android.material.tabs.TabLayout;
import com.google.android.ump.FormError;
import com.google.firebase.perf.FirebasePerformance;
import com.google.firebase.perf.metrics.AddTrace;
import com.google.firebase.perf.metrics.Trace;
import com.google.gson.Gson;
import com.htmedia.mint.AppController;
import com.htmedia.mint.htsubscription.CheckSubscriptionFromLocal;
import com.htmedia.mint.htsubscription.GetUserSubscriptionDetail;
import com.htmedia.mint.htsubscription.SubscriptionConverter;
import com.htmedia.mint.htsubscription.SubscriptionPlanSingleton;
import com.htmedia.mint.htsubscription.SubscriptionTrigger;
import com.htmedia.mint.htsubscription.TokenGenerater;
import com.htmedia.mint.htsubscription.WebEngageAnalytices;
import com.htmedia.mint.htsubscription.deviceidtracking.OfferBannerHandler;
import com.htmedia.mint.htsubscription.deviceidtracking.OfferBannerSingleton;
import com.htmedia.mint.htsubscription.deviceidtracking.pojo.DeviceEligibilityData;
import com.htmedia.mint.htsubscription.deviceidtracking.pojo.DeviceEligibilityPojo;
import com.htmedia.mint.juspay.JuspayCheckout;
import com.htmedia.mint.marketRevamp.marketUtils.HomeActivityTimer;
import com.htmedia.mint.onboarding.fragments.OnboardingFirstPartyActivity;
import com.htmedia.mint.piano.PianoResponseSingleTon;
import com.htmedia.mint.pojo.AdsAnalytics;
import com.htmedia.mint.pojo.Content;
import com.htmedia.mint.pojo.ContextualTargetPojo;
import com.htmedia.mint.pojo.Metadata;
import com.htmedia.mint.pojo.NativeAdsPojo;
import com.htmedia.mint.pojo.NotificationPojo;
import com.htmedia.mint.pojo.OfferPremium;
import com.htmedia.mint.pojo.PremiumOffer;
import com.htmedia.mint.pojo.SocialResponsePojo;
import com.htmedia.mint.pojo.config.AdsArray;
import com.htmedia.mint.pojo.config.BottomStickyAd;
import com.htmedia.mint.pojo.config.CheckUpdatePopup;
import com.htmedia.mint.pojo.config.Config;
import com.htmedia.mint.pojo.config.LShapedAdData;
import com.htmedia.mint.pojo.config.MarketMenuItem;
import com.htmedia.mint.pojo.config.Section;
import com.htmedia.mint.pojo.config.SectionAd;
import com.htmedia.mint.pojo.config.newslist.NewsListConfig;
import com.htmedia.mint.pojo.mywatchlist.MintGenieResponse;
import com.htmedia.mint.pojo.newslist.NewsListItem;
import com.htmedia.mint.pojo.newslist.TempDataHolder;
import com.htmedia.mint.pojo.podcast.Episode;
import com.htmedia.mint.pojo.podcast.Podcast;
import com.htmedia.mint.pojo.premiumstories.PremiumStoryMeter;
import com.htmedia.mint.pojo.subscription.ErrorCode;
import com.htmedia.mint.pojo.subscription.SubscriptionError;
import com.htmedia.mint.pojo.subscription.userdetail.MintSubscriptionDetail;
import com.htmedia.mint.razorpay.utils.OpenCheckoutPage;
import com.htmedia.mint.razorpay.utils.RazorPayCheckout;
import com.htmedia.mint.search.model.CollectionPojo;
import com.htmedia.mint.ui.fragments.AutoRenewalBottomSheet;
import com.htmedia.mint.ui.fragments.BookmarkFragment;
import com.htmedia.mint.ui.fragments.DEWidgetViewAllFragment;
import com.htmedia.mint.ui.fragments.EPaperPayWallBottomSheetFragment;
import com.htmedia.mint.ui.fragments.EditWatchListFragment;
import com.htmedia.mint.ui.fragments.HomeFragment;
import com.htmedia.mint.ui.fragments.HomeTabViewFragment;
import com.htmedia.mint.ui.fragments.MarketDashboardNewFragment;
import com.htmedia.mint.ui.fragments.MintPillerViewAllFragment;
import com.htmedia.mint.ui.fragments.MintShortsFragment;
import com.htmedia.mint.ui.fragments.MutualFundListingViewAllFragment;
import com.htmedia.mint.ui.fragments.MyReadsFragment;
import com.htmedia.mint.ui.fragments.MyWatchlistListingFragment;
import com.htmedia.mint.ui.fragments.NewsInNumberDetailsFragment;
import com.htmedia.mint.ui.fragments.NewsLatestAndTrendingFragment;
import com.htmedia.mint.ui.fragments.NighModeAlertDialogFragment;
import com.htmedia.mint.ui.fragments.NightModeCallBack;
import com.htmedia.mint.ui.fragments.NotificationCenterFragment;
import com.htmedia.mint.ui.fragments.PodcastDetailFragment;
import com.htmedia.mint.ui.fragments.PodcastFragment;
import com.htmedia.mint.ui.fragments.PremiumNewsSubsectionFragment;
import com.htmedia.mint.ui.fragments.PreviewFragment;
import com.htmedia.mint.ui.fragments.SearchFragment;
import com.htmedia.mint.ui.fragments.StoryDetailFragment;
import com.htmedia.mint.ui.fragments.StoryDetailViewFragment;
import com.htmedia.mint.ui.fragments.TopStoriesFragment;
import com.htmedia.mint.ui.fragments.VideoListFragment;
import com.htmedia.mint.ui.fragments.WatchlistSearchFragment;
import com.htmedia.mint.ui.fragments.WhatsAppSubsSuccessDialogFragment;
import com.htmedia.mint.ui.fragments.WhatsAppUpdatesBottomSheetFragment;
import com.htmedia.mint.ui.fragments.leftmenudrawer.LefMenuRevampFragment;
import com.htmedia.mint.ui.workmanager.ConfigWorker;
import com.htmedia.mint.utils.CRIFWebView;
import com.htmedia.mint.utils.CustomTypefaceSpan;
import com.htmedia.mint.utils.f0;
import com.htmedia.mint.utils.h0;
import com.htmedia.mint.utils.h1;
import com.htmedia.mint.utils.j;
import com.htmedia.mint.utils.j1;
import com.htmedia.mint.utils.k0;
import com.htmedia.mint.utils.k1;
import com.htmedia.mint.utils.l0;
import com.htmedia.mint.utils.m1;
import com.htmedia.mint.utils.n;
import com.htmedia.mint.utils.o1;
import com.htmedia.mint.utils.p1;
import com.htmedia.mint.utils.q;
import com.htmedia.mint.utils.s0;
import com.htmedia.mint.utils.t0;
import com.htmedia.mint.utils.v2;
import com.htmedia.sso.activities.LoginRegisterActivity;
import com.htmedia.sso.helpers.SSOSingleton;
import com.htmedia.sso.helpers.WebEngageNewSSOEvents;
import com.htmedia.sso.models.GenericEventRequest;
import com.razorpay.PaymentData;
import com.razorpay.PaymentResultWithDataListener;
import e7.c;
import eu.dkaratzas.android.inapp.update.Constants;
import eu.dkaratzas.android.inapp.update.InAppUpdateManager;
import f6.l;
import f6.m;
import h.b;
import hc.a;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
import k6.g;
import k6.h;
import k6.l1;
import k6.o0;
import k6.p0;
import k6.r;
import k6.s;
import k6.t;
import k6.u;
import k6.u0;
import k6.w1;
import n4.c;
import o4.k;
import org.json.JSONException;
import org.json.JSONObject;
import p000.p001.bi;
import p002i.p003i.pk;
import q7.q4;
import s6.d;
import u4.i;
import v5.y;
import w9.e;
import x4.ai;
import x4.k4;
import x4.sg;
import x4.y0;
import x4.yp0;
import y5.o;
import y7.r4;
public class HomeActivity extends a implements c, s, o0, l1, BottomNavigationView.OnNavigationItemSelectedListener, NavigationView.OnNavigationItemSelectedListener, GetUserSubscriptionDetail.OnSubscriptionDetail, u, h, u0, b, d, PaymentResultWithDataListener {
public static boolean A0;
public static boolean B0;
public static boolean C0;
public static boolean D0;
public static int E0;
public static boolean F0;
public static HomeActivity G0;
public static List<AdsArray> K0;
public static com.htmedia.mint.partners.cred.b L0;
public static boolean O0;
public static boolean P0;
private HashMap<String, String> A;
private r B;
public NightModeCallBack C;
private p0 D;
private TextView E;
private TextView F;
private InAppUpdateManager G;
private List<String> I;
private t J;
private g K;
private Menu L;
public OfferBannerHandler M;
public f N;
public f O;
public f P;
public f Q;
private NighModeAlertDialogFragment R;
private v7.g S;
private MenuItem T;
private MenuItem U;
private Content V;
private String W;
private s6.c X;
private RazorPayCheckout Y;
private boolean Z;
private e6.b a;
private boolean a0;
private boolean b0;
private boolean c0;
private String e0;
public Toolbar f;
private String f0;
public MenuItem g;
private r4 g0;
public MenuItem h;
private c.a h0;
public MenuItem i;
public y0 i0;
public MenuItem j;
public boolean j0;
public boolean k0;
private boolean l0;
private j1 m0;
int n0;
public MenuItem o;
public MenuItem p;
private HomeActivityTimer p0;
public MenuItem q;
public MenuItem r;
boolean r0;
public MenuItem s;
private CountDownTimer s0;
public MenuItem t;
String t0;
private int u;
private JuspayCheckout v;
AdManagerAdView v0;
e7.g w;
private k0 w0;
private Config y;
private AppController z;
l0 z0;
public static ArrayList<NativeAdsPojo> H0 = new ArrayList<>();
public static AdsAnalytics I0 = new AdsAnalytics();
public static AdsAnalytics J0 = new AdsAnalytics();
public static int M0 = 0;
public static String N0 = "";
public static long Q0 = 0;
private String b = "";
private int c = 0;
private String d = s0.t1.b();
public boolean e = false;
boolean x = false;
private final boolean H = false;
private boolean d0 = false;
private final String[] o0 = {"Search \"Stocks\"", "Search \"Mutual Funds\"", "Search \"IPO\"", "Search \"Gold rate today\""};
ActivityResultLauncher<String> q0 = registerForActivityResult(new ActivityResultContracts.RequestPermission(), new e0(this));
int u0 = 0;
private Handler x0 = new Handler();
int y0 = 60000;
public void A2(Content content, View view) {
SubscriptionPlanSingleton.getInstance().setContent(content);
WebEngageAnalytices.trackClickEvents("Subscribe Now", (String) null, "Paywall Pop Up Clicked", content, "Paywall", "", "");
n.A(this, n.d1, (String) null, n.m0, content, (String) null);
Intent openPlanPageIntent = SubscriptionTrigger.openPlanPageIntent(this, "others", content);
if (openPlanPageIntent != null) {
openPlanPageIntent.putExtra("planpagecta", q.x.c.ordinal());
if (content != null && content.getMetadata() != null) {
openPlanPageIntent.putExtra("urlkey", content.getMetadata().getUrl());
openPlanPageIntent.putExtra("keybuttonName", "Subscribe_story");
openPlanPageIntent.putExtra("funnelName", "Paywall");
if (content.getMetadata() == null || !content.getMetadata().isPremiumStory()) {
openPlanPageIntent.putExtra("keyPremiumStrory", "Dynamic");
openPlanPageIntent.putExtra("paywallReason", "Dynamic");
} else {
openPlanPageIntent.putExtra("keyPremiumStrory", "Premium");
openPlanPageIntent.putExtra("paywallReason", "Premium");
}
content.setPartnerStory(true);
SSOSingleton.getInstance().setPaywallReson(n.m(content));
String str = "";
SSOSingleton.getInstance().setPreviousScreenReferrer(content.getMetadata() != null ? content.getMetadata().getUrl() : "");
SSOSingleton.getInstance().setSsoOrigin("Paywall");
SSOSingleton.getInstance().setPlanPageReason("Paywall");
SubscriptionPlanSingleton.getInstance().setContent(content);
SubscriptionPlanSingleton subscriptionPlanSingleton = SubscriptionPlanSingleton.getInstance();
if (content.getPaywallTypes() != null && content.getPaywallTypes().getItems() != null) {
str = content.getPaywallTypes().getItems().getExperience();
}
subscriptionPlanSingleton.setPianoExpName(str);
}
startActivityForResult(openPlanPageIntent, 1009);
}
}
private void B0(Activity activity, String str) {
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setMessage(str);
builder.setTitle(2131952653);
builder.setPositiveButton(2131952649, (DialogInterface.OnClickListener) new t(this));
AlertDialog create = builder.create();
create.setCancelable(false);
if (activity == null || isFinishing()) {
return;
}
create.show();
}
private void B2(FragmentManager fragmentManager, Bundle bundle, int i) {
if (bundle.containsKey("top_section_section")) {
HomeTabViewFragment homeTabViewFragment = new HomeTabViewFragment();
bundle.putString(n.X, f0.W0());
homeTabViewFragment.setArguments(Y1(bundle));
fragmentManager.beginTransaction().add(2131429286, homeTabViewFragment, "Tag_Section").addToBackStack("Tag_Section").commitAllowingStateLoss();
return;
}
String string = getIntent().getExtras().getString("story_id", "");
if (string != null && !TextUtils.isEmpty(string)) {
new m(this, fragmentManager, bundle, i, this.y);
return;
}
HomeTabViewFragment homeTabViewFragment2 = new HomeTabViewFragment();
bundle.putString(n.X, f0.W0());
homeTabViewFragment2.setArguments(Y1(bundle));
bundle.putParcelable("top_section_section", (Parcelable) this.z.g().getBottomNav().get(f0.E0(this.z.g().getBottomNav().size())));
try {
fragmentManager.popBackStackImmediate((String) null, 1);
} catch (Exception e) {
e.printStackTrace();
}
fragmentManager.beginTransaction().add(2131429286, homeTabViewFragment2, "HOME").addToBackStack("HOME").commitAllowingStateLoss();
if (getIntent().getExtras() == null || !getIntent().getExtras().containsKey("key_l1_menu_key")) {
return;
}
p1(getIntent().getExtras().getString("key_l1_menu_key"));
}
private void B3() {
HomeFragment findFragmentById = getSupportFragmentManager().findFragmentById(2131429286);
Section section = findFragmentById instanceof HomeFragment ? findFragmentById.section : null;
if (section != null && !TextUtils.isEmpty(section.getTabImageId()) && section.getTabImageId().toLowerCase(Locale.ENGLISH).contains("economist")) {
BottomNavigationView bottomNavigationView = this.i0.a.b;
if (bottomNavigationView != null && bottomNavigationView.getMenu() != null) {
if (AppController.j().E()) {
BottomNavigationView bottomNavigationView2 = this.i0.a.b;
bottomNavigationView2.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView2.getContext(), 2131231605));
} else {
BottomNavigationView bottomNavigationView3 = this.i0.a.b;
bottomNavigationView3.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView3.getContext(), 2131231604));
}
if (this.i0.a.b.getMenu().findItem(801) != null) {
if (AppController.j().E()) {
this.i0.a.b.getMenu().findItem(801).setIcon(2131233893);
} else {
this.i0.a.b.getMenu().findItem(801).setIcon(2131233892);
}
}
}
} else if (findFragmentById instanceof PremiumNewsSubsectionFragment) {
BottomNavigationView bottomNavigationView4 = this.i0.a.b;
if (bottomNavigationView4 != null && bottomNavigationView4.getMenu() != null && this.i0.a.b.getMenu().findItem(801) != null) {
if (AppController.j().E()) {
this.i0.a.b.getMenu().findItem(801).setIcon(2131233893);
} else {
this.i0.a.b.getMenu().findItem(801).setIcon(2131233892);
}
}
} else if (findFragmentById instanceof TopStoriesFragment) {
BottomNavigationView bottomNavigationView5 = this.i0.a.b;
if (bottomNavigationView5 != null && bottomNavigationView5.getMenu() != null && this.i0.a.b.getMenu().findItem(1004) != null) {
if (AppController.j().E()) {
this.i0.a.b.getMenu().findItem(1004).setIcon(2131234285);
} else {
this.i0.a.b.getMenu().findItem(1004).setIcon(2131234285);
}
}
} else if (findFragmentById instanceof VideoListFragment) {
if (!((VideoListFragment) findFragmentById).isFromBottomNav() && this.i0.a.b.getMenu().findItem(1000) == null) {
this.i0.a.g.setVisibility(8);
this.i0.a.p.setVisibility(8);
this.i0.a.o.setVisibility(8);
R3();
}
BottomNavigationView bottomNavigationView6 = this.i0.a.b;
if (bottomNavigationView6 != null && bottomNavigationView6.getMenu() != null && this.i0.a.b.getMenu().findItem(801) != null) {
this.i0.a.b.getMenu().findItem(801).setIcon(2131233893);
}
BottomNavigationView bottomNavigationView7 = this.i0.a.b;
bottomNavigationView7.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView7.getContext(), 2131231606));
} else {
BottomNavigationView bottomNavigationView8 = this.i0.a.b;
if (bottomNavigationView8 != null && bottomNavigationView8.getMenu() != null) {
if (AppController.j().E()) {
BottomNavigationView bottomNavigationView9 = this.i0.a.b;
bottomNavigationView9.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView9.getContext(), 2131231606));
} else {
BottomNavigationView bottomNavigationView10 = this.i0.a.b;
bottomNavigationView10.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView10.getContext(), 2131231603));
}
if (this.i0.a.b.getMenu().findItem(801) != null) {
if (AppController.j().E()) {
this.i0.a.b.getMenu().findItem(801).setIcon(2131233893);
} else {
this.i0.a.b.getMenu().findItem(801).setIcon(2131233892);
}
}
}
}
BottomNavigationView bottomNavigationView11 = this.i0.a.b;
if (bottomNavigationView11 == null || bottomNavigationView11.getMenu() == null) {
return;
}
if (this.i0.a.b.getMenu().findItem(801) != null) {
this.i0.a.b.getMenu().findItem(801).setIconTintMode(PorterDuff.Mode.DST);
}
if (this.i0.a.b.getMenu().findItem(1002) != null) {
this.i0.a.b.getMenu().findItem(1002).setIconTintMode(PorterDuff.Mode.DST);
}
}
private void C0() {
try {
MintSubscriptionDetail l = AppController.j().l();
Bundle extras = getIntent().getExtras();
if (extras != null && extras.containsKey("deeplinkpage") && "whatsappoptin".equalsIgnoreCase(extras.getString("deeplinkpage")) && f0.G1(this, "userName") != null && (l == null || !l.isSubscriptionActive())) {
F0(extras);
Intent intent = new Intent((Context) this, (Class<?>) WhatsappSubscriptionActivity.class);
intent.putExtra("whatsapp_origin", "Loyal Users");
intent.putExtra("campaign", "1");
startActivityForResult(intent, 1012);
return;
}
if (extras == null || !extras.containsKey("deeplinkpage") || !"whatsappoptinsubscribed".equalsIgnoreCase(extras.getString("deeplinkpage")) || f0.G1(this, "userName") == null || l == null || !l.isSubscriptionActive()) {
return;
}
F0(extras);
Intent intent2 = new Intent((Context) this, (Class<?>) WhatsappSubscriptionActivity.class);
intent2.putExtra("whatsapp_origin", "Deeplink");
intent2.putExtra("campaign", "1");
startActivityForResult(intent2, 1012);
} catch (Exception e) {
e.printStackTrace();
}
}
private void D0() {
new Thread((Runnable) new a0(this)).start();
}
private void D2(String str) {
j1.u0(G0, U0("market_page", f0.r0()), q.c0.b.a(), true, str);
}
private void E2(String str) {
k1.x(k1.l(this), "/Search");
n.M(this, n.U1, "", (Content) null, "", new String[]{"Search"});
n.M(this, n.a2, "home", (Content) null, "", new String[]{"Search"});
getSupportFragmentManager().findFragmentById(2131429286);
FragmentManager supportFragmentManager = getSupportFragmentManager();
y6.c cVar = new y6.c();
y6.c.t = "top_header";
Bundle bundle = new Bundle();
if (str.equalsIgnoreCase(getString(2131952569))) {
bundle.putBoolean("isStockSelected", true);
} else if (str.equalsIgnoreCase(getString(2131952266))) {
bundle.putBoolean("isMutualFundSelected", true);
}
bundle.putString("MARKET_DASH_TAB_KEY", str);
cVar.setArguments(bundle);
supportFragmentManager.beginTransaction().add(2131429286, cVar, "Search_Revamp").addToBackStack("Search_Revamp").commit();
f4(false, "");
}
private void E3(Config config) {
AppController j = AppController.j();
if (j != null) {
if (config == null) {
config = j.g();
}
if (config == null || !config.isGdprAlertEnabled()) {
return;
}
h4.d f = h4.d.f(j);
f.g(this, new z0(this, f, j));
P1(f, j);
}
}
private void F0(Bundle bundle) {
if (bundle != null && bundle.containsKey("deeplinkpagewhatsapp")) {
bundle.remove("deeplinkpagewhatsapp");
}
if (bundle.containsKey("deeplinkpage")) {
bundle.remove("deeplinkpage");
}
getIntent().putExtras(bundle);
}
private static String F1(String str) {
Config g = AppController.j().g();
BottomStickyAd bottomStickyAd = null;
if (g != null && g.getAdsAndroidNew() != null) {
bottomStickyAd = g.getAdsAndroidNew().getBottomStickyAd();
}
if (bottomStickyAd == null || bottomStickyAd.getSectionAds() == null || bottomStickyAd.getSectionAds().size() <= 0) {
return "";
}
for (int i = 0; i < bottomStickyAd.getSectionAds().size(); i++) {
if (((SectionAd) bottomStickyAd.getSectionAds().get(i)).getSectionName().equalsIgnoreCase(str)) {
return ((SectionAd) bottomStickyAd.getSectionAds().get(i)).getAdId();
}
}
return "";
}
private void F2(String str, int i) {
this.i0.a.g.setVisibility(8);
TextView textView = this.i0.a.J;
if (textView != null) {
textView.setVisibility(0);
this.i0.a.J.setText(str);
}
this.i0.a.H.setVisibility(8);
if (AppController.j().E()) {
this.i0.a.J.setTextColor(getResources().getColor(2131100951));
} else {
this.i0.a.J.setTextColor(getResources().getColor(2131101008));
}
BottomNavigationView bottomNavigationView = this.i0.a.b;
if (bottomNavigationView == null || bottomNavigationView.getMenu().findItem(i) == null) {
return;
}
this.i0.a.b.getMenu().findItem(i).setChecked(true);
}
public void G1(Config config, int i) {
kd.b.e().n(this);
boolean R1 = R1(i);
if (!R1 && i <= 0) {
i = 101;
}
this.c = i;
this.i0.a.b.setSelectedItemId(i);
c.a aVar = this.h0;
if (aVar != null && ((aVar == c.a.a || aVar == c.a.b) && R1 && i != 101)) {
this.l0 = true;
Bundle extras = (getIntent() == null || getIntent().getExtras() == null) ? null : getIntent().getExtras();
if (extras == null || !extras.containsKey("isNotification")) {
this.n0 = q.m.a.ordinal();
} else {
this.n0 = extras.getInt("isNotification");
}
if (this.n0 == q.m.a.ordinal() || this.n0 == q.m.g.ordinal()) {
if (extras != null && extras.containsKey("IS_BUDGET") && extras.getBoolean("IS_BUDGET")) {
X3();
}
}
}
I1();
}
public void G2() {
J3();
E1();
D1();
if ((getIntent().getExtras() == null || !getIntent().getExtras().containsKey("author_name")) && !this.Z && !this.d0 && !this.a0) {
if (getSupportFragmentManager().getBackStackEntryCount() <= 1) {
onBackPressed();
return;
}
getSupportFragmentManager().popBackStack();
v1();
new Handler().postDelayed(new f(this), 500L);
return;
}
if (this.d0) {
this.d0 = false;
}
if (this.Z) {
this.Z = false;
}
if (this.a0) {
this.a0 = false;
}
finish();
}
private void H1() {
Config config = this.y;
if (config != null ? config.isInterstitialAdsEnabledForAndroid() : false) {
Log.e("AdsManagerUtils", "initFullScreenAds Start: ");
if (this.x0 == null) {
this.x0 = new Handler();
}
this.x0.postDelayed(new v(this), 1000L);
}
}
private void H2() {
finish();
startActivity(new Intent((Context) this, (Class<?>) HomeActivity.class));
}
private void I1() {
HashMap hashMap = new HashMap();
String F1 = f0.F1(this);
if (F1 != null) {
hashMap.put("userEmail", F1);
}
if (f0.G1(this, "userName") != null) {
hashMap.put("userName", f0.G1(this, "userName"));
}
if (!hashMap.isEmpty()) {
com.htmedia.mint.utils.o0.i(hashMap);
}
for (int i = 0; i < this.i0.a.b.getMenu().size(); i++) {
w0(this.i0.a.b.getMenu().getItem(i));
}
if (getIntent().getExtras() != null && getIntent().getExtras().containsKey("isNotification") && getIntent().getExtras().getInt("isNotification") > q.m.a.ordinal()) {
r1();
}
BottomNavigationMenuView childAt = this.i0.a.b.getChildAt(0);
if (childAt != null) {
for (int i2 = 0; i2 < childAt.getChildCount(); i2++) {
try {
View findViewById = childAt.getChildAt(i2).findViewById(2131428724);
ViewGroup.LayoutParams layoutParams = findViewById.getLayoutParams();
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
layoutParams.height = (int) TypedValue.applyDimension(1, 18.0f, displayMetrics);
layoutParams.width = (int) TypedValue.applyDimension(1, -2.0f, displayMetrics);
findViewById.setLayoutParams(layoutParams);
} catch (Exception e) {
e.printStackTrace();
com.htmedia.mint.utils.o0.g(e, getClass().getSimpleName());
}
}
}
I2();
c3();
e3();
l.m(this, "update_local_apis", Boolean.FALSE);
D0();
new h5.f(this, this.i0.a.b).g(this.y);
if (getIntent().getExtras() == null || !getIntent().getExtras().containsKey("isNotification") || getIntent().getExtras().getInt("isNotification") <= q.m.a.ordinal()) {
return;
}
o1();
}
private void I3(int i) {
runOnUiThread(new h(this, i));
}
private void J1() {
JuspayCheckout juspayCheckout = new JuspayCheckout(this, true, false);
this.v = juspayCheckout;
juspayCheckout.o(this);
}
private void K1() {
this.p0 = new HomeActivityTimer(this);
}
private void L0(Config config) {
this.h0 = n4.c.e(AppController.j());
if (!h5.c.e) {
new Thread((Runnable) new c(this, config)).start();
} else {
h5.c.e = false;
G1(config, 101);
}
}
private void L1() {
Toolbar findViewById = findViewById(2131430942);
this.f = findViewById;
findViewById.setContentInsetStartWithNavigation(0);
setSupportActionBar(this.f);
getSupportActionBar().setDisplayShowTitleEnabled(false);
}
private void L2() {
if (AppController.j().l() != null && ((AppController.j().l() == null || AppController.j().l().isSubscriptionActive()) && (AppController.j().l() == null || !AppController.j().l().isSubscriptionActive() || !AppController.j().l().isGifted()))) {
Toast.makeText((Context) this, (CharSequence) "You're already a subscriber !", 1).show();
} else if (AppController.j().l() == null || !SubscriptionConverter.isSKUPlanActive(AppController.j().l())) {
T2();
} else {
Toast.makeText((Context) this, (CharSequence) "You're already a subscriber !", 1).show();
}
}
private void L3(boolean z) {
if (z) {
if (f0.e2(this, AppController.j().l())) {
this.h.setIcon(2131232684);
return;
} else {
this.h.setIcon(2131232683);
return;
}
}
if (f0.e2(this, AppController.j().l())) {
this.h.setIcon(2131232682);
} else {
this.h.setIcon(2131232681);
}
}
private void M0() {
Config config = this.y;
if ((config == null || config.getSubscription() == null || !this.y.getSubscription().isSubscriptionEnable()) ? false : true) {
String G1 = f0.G1(this, "userName");
AppController.j().l();
f0.H1(this);
if (!TextUtils.isEmpty(G1)) {
new GetUserSubscriptionDetail(this, this).fetchUserSubscriptionDetail("HomeActivity", q.f0.e, false);
}
K0();
}
}
private void M1(Config config) {
f0.i(this, this.i0.a.b, config);
U3();
x0();
if (f0.G1(this, "userName") != null) {
f0.n((String) null, this, "allBookmark", (ImageView) null, (ImageView) null, (RecyclerView.Adapter) null, false, (ArrayList) null, (Content) null, (d3) null, true);
}
L0(config);
}
private void M2() {
Fragment findFragmentByTag;
try {
Config r0 = f0.r0();
this.y = r0;
if (r0 == null || r0.getDynamicLogoChange() == null || !this.y.getDynamicLogoChange().isAndroidAppIconChange()) {
return;
}
boolean isSubscribedUser = CheckSubscriptionFromLocal.isSubscribedUser(this);
boolean b = l.b(this, "is_icon_bottom_sheet_shown", "icon_bottom_sheet");
boolean b2 = l.b(this, "is_icon_premium", "icon_premium");
if (!isSubscribedUser && b2 && ((findFragmentByTag = getSupportFragmentManager().findFragmentByTag("DailogIconChangeLoggedoutFragment")) == null || !(findFragmentByTag instanceof k))) {
k kVar = new k();
kVar.u(new j(this));
Bundle bundle = new Bundle();
bundle.putBoolean("isPremiumUser", false);
kVar.setArguments(bundle);
kVar.setCancelable(false);
kVar.show(getSupportFragmentManager(), "DailogIconChangeLoggedoutFragment");
O0 = true;
}
if (!isSubscribedUser || b) {
return;
}
Fragment findFragmentByTag2 = getSupportFragmentManager().findFragmentByTag("DailogIconChangeFragment");
if (findFragmentByTag2 == null || !(findFragmentByTag2 instanceof k)) {
k kVar2 = new k();
kVar2.u(new l(this));
Bundle bundle2 = new Bundle();
bundle2.putBoolean("isPremiumUser", true);
kVar2.setArguments(bundle2);
kVar2.setCancelable(false);
kVar2.show(getSupportFragmentManager(), "DailogIconChangeFragment");
O0 = true;
}
} catch (Exception e) {
e.printStackTrace();
}
}
private void M3(boolean z, Fragment fragment) {
if (z) {
if (f0.e2(this, AppController.j().l())) {
this.h.setIcon(2131232684);
return;
} else {
this.h.setIcon(2131232683);
return;
}
}
if (f0.e2(this, AppController.j().l())) {
this.h.setIcon(2131232682);
} else if (fragment instanceof VideoListFragment) {
this.h.setIcon(2131232683);
} else {
this.h.setIcon(2131232681);
}
}
private void N1() {
if (this.w0 == null) {
this.w0 = new ViewModelProvider(this, ViewModelProvider.AndroidViewModelFactory.getInstance(getApplication())).get(k0.class);
}
l0 l0Var = new l0(this, this.w0);
this.z0 = l0Var;
l0Var.g();
}
private void N2(String str) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
g8.f fVar = new g8.f();
Bundle bundle = new Bundle();
bundle.putString("Infographics", "Infographics");
bundle.putString("info_graphics_origin", "Deeplink");
bundle.putString("key_infographics_tabname", j1.S(str));
fVar.setArguments(bundle);
supportFragmentManager.beginTransaction().add(2131429286, fVar, "Infographics").addToBackStack("Infographics").commitAllowingStateLoss();
f4(false, "INFOGRAPHICS");
}
private String O0() {
FragmentManager supportFragmentManager = getSupportFragmentManager();
int backStackEntryCount = supportFragmentManager.getBackStackEntryCount();
List fragments = supportFragmentManager.getFragments();
if (fragments.size() <= 0 || fragments.size() < backStackEntryCount) {
return "HOME";
}
if (backStackEntryCount > 0) {
backStackEntryCount--;
}
return ((Fragment) fragments.get(backStackEntryCount)).getTag();
}
public void P0() {
HomeActivityTimer homeActivityTimer = this.p0;
if (homeActivityTimer != null) {
homeActivityTimer.getCurrentFragmentAndSetTimer(true);
}
}
private void P1(h4.d dVar, AppController appController) {
new Thread((Runnable) new o0(this, dVar, appController)).start();
}
private void P3(TextView textView) {
if (textView != null) {
if (SubscriptionConverter.isSKUPlanActive(AppController.j().l())) {
textView.setText("Upgrade");
} else {
textView.setText(getResources().getString(2131952584));
}
}
}
private boolean Q1(Config config) {
if (config == null) {
try {
config = AppController.j().g();
} catch (Exception unused) {
return false;
}
}
if (config == null) {
return false;
}
CheckUpdatePopup checkUpdatePopup = config.getCheckUpdatePopup();
if (checkUpdatePopup != null) {
if (!checkUpdatePopup.isShowPopup()) {
return false;
}
if (S1(checkUpdatePopup)) {
return false;
}
}
return true;
}
private boolean R1(int i) {
BottomNavigationView bottomNavigationView = this.i0.a.b;
MenuItem findItem = (bottomNavigationView == null || bottomNavigationView.getMenu() == null) ? null : this.i0.a.b.getMenu().findItem(i);
if (findItem == null) {
return false;
}
CharSequence title = findItem.getTitle();
if (title == null || TextUtils.isEmpty(title.toString())) {
return true;
}
this.b = title.toString();
return true;
}
private boolean S1(CheckUpdatePopup checkUpdatePopup) {
List<Integer> excludeVersion;
if (checkUpdatePopup == null || (excludeVersion = checkUpdatePopup.getExcludeVersion()) == null || excludeVersion.isEmpty()) {
return false;
}
for (Integer num : excludeVersion) {
if (num != null && num.intValue() == 304) {
return true;
}
}
return false;
}
private void S3() {
this.i0.a.q.setExpanded(true, true);
f4(true, getString(2131952626));
d4(false);
if (this.i0.a.b != null && U1()) {
this.i0.a.b.setVisibility(0);
}
e4(false, "", null);
}
private String T0(String str) {
Uri parse;
if (TextUtils.isEmpty(str) || (parse = Uri.parse(str)) == null || TextUtils.isEmpty(parse.getHost()) || !parse.getHost().contains("livemint.com")) {
return "";
}
String path = parse.getPath();
if (TextUtils.isEmpty(path)) {
return "";
}
String[] split = path.split("/episode");
if (split.length <= 0) {
return "";
}
String str2 = split[0];
if (!str2.contains("-")) {
return "";
}
String str3 = str2.split("-")[r3.length - 1];
return !TextUtils.isEmpty(str3) ? str3 : "";
}
private void T2() {
Intent intent = new Intent((Context) this, (Class<?>) MyAccountActivity.class);
intent.putExtra("is_from_subs_gift", true);
if (getIntent() != null && getIntent().hasExtra("url")) {
intent.putExtra("url", getIntent().getStringExtra("url"));
}
startActivity(intent);
}
private void T3() {
if (PianoResponseSingleTon.getInstance().getPianoResponse() == null || PianoResponseSingleTon.getInstance().getPianoResponse().getMobilePaywall() == null || PianoResponseSingleTon.getInstance().getPianoResponse().getMobilePaywall().getUnlockArticleTemplate() == null || PianoResponseSingleTon.getInstance().getPianoResponse().getMobilePaywall().getUnlockArticleTemplate().getItems() == null) {
return;
}
j.u0(this, j.c, PianoResponseSingleTon.getInstance().getPianoResponse().getMobilePaywall().getUnlockArticleTemplate().getItems());
}
public void U2() {
n.M(this, n.U1, "", (Content) null, "", new String[]{"My Reads"});
FragmentManager supportFragmentManager = getSupportFragmentManager();
j4("MY READS", false);
MyReadsFragment myReadsFragment = new MyReadsFragment();
Bundle bundle = new Bundle();
bundle.putString(n.X, "Explore");
myReadsFragment.setArguments(bundle);
supportFragmentManager.beginTransaction().add(2131429286, myReadsFragment, "MY READS").addToBackStack("MY READS").commitAllowingStateLoss();
Config config = this.y;
if (config == null || !config.isShowPremiumSection()) {
j4("MY READS", false);
} else {
f4(false, "MY READS");
}
}
private void U3() {
Toolbar findViewById = findViewById(2131430942);
this.f = findViewById;
findViewById.post(new c1(this));
this.i0.a.b.setOnNavigationItemSelectedListener(this);
}
private int V0() {
Menu menu = this.i0.a.b.getMenu();
for (int i = 0; i < this.i0.a.b.getMenu().size(); i++) {
MenuItem item = menu.getItem(i);
if (item.isChecked()) {
return item.getItemId();
}
}
return 0;
}
private boolean W0() {
Config config = this.y;
if (config == null || config.getSubscription() == null) {
return false;
}
return this.y.getSubscription().isSubscriptionEnable();
}
private boolean W1(String str) {
return str.contains("/episode") || str.contains("episode=");
}
private String X1() {
Bundle extras = getIntent().getExtras();
if (extras == null || !extras.containsKey("deeplinkpage")) {
return null;
}
return extras.getString("deeplinkpage");
}
private void X2(String str) {
Intent openPlanPageIntent = SubscriptionTrigger.openPlanPageIntent(this, str, false);
openPlanPageIntent.putExtra("planpagecta", q.x.i.ordinal());
openPlanPageIntent.putExtra("urlkey", "https://accounts.hindustantimes.com/lm/userplan");
openPlanPageIntent.putExtra("keybuttonName", "Subscribe_profile");
openPlanPageIntent.putExtra("funnelName", str);
startActivityForResult(openPlanPageIntent, 1009);
SubscriptionPlanSingleton.getInstance().setContent((Content) null);
SubscriptionPlanSingleton.getInstance().setPageReason(str);
SSOSingleton.getInstance().setPlanPageReason(str);
SSOSingleton.getInstance().setPaywallReson("");
Bundle bundle = new Bundle();
bundle.putString(n.X, str);
SubscriptionPlanSingleton.getInstance().setPianoExpName("");
n.l0(this, n.t1, bundle);
}
private void Y0(String str) {
if (!TextUtils.isEmpty(str)) {
str = str.trim();
}
FragmentManager supportFragmentManager = getSupportFragmentManager();
if (f0.X1(str)) {
i.a.d(supportFragmentManager, Long.valueOf(Long.parseLong(str)));
}
}
private Bundle Y1(Bundle bundle) {
if (bundle.containsKey("top_section_section")) {
String displayName = bundle.getParcelable("top_section_section").getDisplayName();
if (displayName != null && displayName.contains("?")) {
displayName = displayName.substring(0, displayName.indexOf("?"));
}
if (displayName != null && displayName.equalsIgnoreCase("wsj")) {
Section wsjSection = this.y.getWsjSection();
wsjSection.setWsj(true);
bundle.putParcelable("top_section_section", wsjSection);
}
}
return bundle;
}
private void Y2(String str) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
if (supportFragmentManager != null) {
PodcastFragment podcastFragment = new PodcastFragment();
Bundle bundle = new Bundle();
bundle.putString("origin", str);
podcastFragment.setArguments(bundle);
supportFragmentManager.beginTransaction().add(2131429286, podcastFragment, "Podcast").addToBackStack("Podcast").commitAllowingStateLoss();
}
}
private void Y3() {
if (AppController.j().E() || !f0.F() || f0.y0(l.j(this, "last_saved_timestamp"), System.currentTimeMillis()) <= 90) {
return;
}
l.m(this, "last_saved_timestamp", Long.valueOf(System.currentTimeMillis()));
AppController.j().N(true);
AppController.j().S(true);
J3();
s3();
if (R0() != null) {
R0().onRefresh();
}
f0.W("Dark Mode", "Yes", this);
FragmentManager supportFragmentManager = getSupportFragmentManager();
if (supportFragmentManager != null) {
this.R = NighModeAlertDialogFragment.newInstance();
if (!TextUtils.isEmpty(O0()) && O0().equalsIgnoreCase("HOME")) {
this.R.show(supportFragmentManager, "NighModeAlertDialogFragment");
}
}
H0();
AppController.M = true;
}
private void Z0(boolean z) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
v4.c.a.a();
supportFragmentManager.beginTransaction().add(2131429286, s4.q.O(z), "AUTHOR_SEARCH_FRAGMENT_TAG").addToBackStack("AUTHOR_SEARCH_FRAGMENT_TAG").commitAllowingStateLoss();
AppController.K = "Author Page";
AppController.L = "Author Page";
}
public void Z1() {
String str;
Fragment fragment;
ai aiVar;
ViewPager viewPager;
ViewPager viewPager2;
HomeFragment homeFragment;
q4 q4Var;
HomeFragment homeFragment2;
Section section;
Bundle extras;
boolean z = true;
int backStackEntryCount = getSupportFragmentManager().getBackStackEntryCount() - 1;
if (backStackEntryCount >= 0) {
String name = getSupportFragmentManager().getBackStackEntryAt(backStackEntryCount).getName();
Fragment findFragmentByTag = getSupportFragmentManager().findFragmentByTag(name);
y4();
x4();
str = name;
fragment = findFragmentByTag;
} else {
str = null;
fragment = null;
}
o1.a("TAG INDEX", backStackEntryCount + " " + str);
Analytics.notifyEnterForeground();
l.m(this, "screen_start_time", Long.valueOf(System.currentTimeMillis()));
if (G0 == null) {
G0 = this;
if (getIntent().getExtras() != null && G0.getIntent().getExtras().containsKey("AppBack") && (extras = getIntent().getExtras()) != null && extras.getBoolean("AppBack")) {
extras.remove("AppBack");
Intent intent = getIntent();
intent.putExtras(extras);
G0.setIntent(intent);
if (fragment instanceof HomeFragment) {
HomeFragment homeFragment3 = (HomeFragment) fragment;
homeFragment3.clearStoryIds();
homeFragment3.scrollListinerForCloseButton.checkEventsForList();
}
}
}
if (str != null) {
f0.c0(this.i0.a.d);
f0.d0(this.i0.a.s);
if (str.equalsIgnoreCase("HOME")) {
c4(false);
f0.v3(0);
this.i0.a.b.setVisibility(0);
if (fragment != null && (fragment instanceof HomeTabViewFragment)) {
HomeTabViewFragment homeTabViewFragment = (HomeTabViewFragment) fragment;
homeTabViewFragment.updateNightMood();
HomeFragment selectedFragment = homeTabViewFragment.getSelectedFragment();
if (selectedFragment != null) {
selectedFragment.refreshAuthorItemList();
selectedFragment.clearStoryIds();
selectedFragment.sendStoryEvents();
}
}
d4(false);
f4(true, "");
Config config = this.y;
String homeAdId = (config == null || config.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null) ? "" : this.y.getAdsAndroidNew().getBottomStickyAd().getHomeAdId();
e4(true, TextUtils.isEmpty(homeAdId) ? "" : homeAdId, new Section());
if (AppController.j().F() && f0.B1(l.j(this, "new_article_visibility_timestamp"), System.currentTimeMillis()) > 30) {
this.i0.a.b.setSelectedItemId(101);
l.m(this, "new_article_visibility_timestamp", Long.valueOf(System.currentTimeMillis()));
}
AppController.j().b0(false);
return;
}
if (str.equalsIgnoreCase("Top News")) {
S3();
return;
}
if (str.equalsIgnoreCase("news_list_details")) {
d4(true);
return;
}
if (str.equalsIgnoreCase("news_list_fragment")) {
d4(true);
return;
}
if (str.equalsIgnoreCase("StockDetails")) {
d4(true);
return;
}
if (str.equalsIgnoreCase("MutalFundViewAll")) {
d4(true);
return;
}
if (str.equalsIgnoreCase("CompanyFinancialViewAll")) {
d4(true);
return;
}
if (str.equalsIgnoreCase("mymint_tab")) {
AppBarLayout appBarLayout = this.i0.a.q;
if (appBarLayout != null) {
appBarLayout.setExpanded(true, true);
}
Log.e("addBack", "addBackStackChangeListener");
c4(false);
C1();
if (this.i0.a.b != null && U1()) {
this.i0.a.b.setVisibility(0);
}
if (fragment != null && (fragment instanceof v5.l)) {
v5.l lVar = (v5.l) fragment;
if (lVar.M() != null) {
y M = lVar.M();
if (M != null && (M instanceof y)) {
y yVar = M;
yVar.C();
yVar.D();
lVar.s0();
} else if (M != null && (M instanceof v5.m)) {
((v5.m) M).onResume();
}
}
}
g3();
return;
}
if (str.equalsIgnoreCase("AUTHOR_SEARCH_FRAGMENT_TAG")) {
AppBarLayout appBarLayout2 = this.i0.a.q;
if (appBarLayout2 != null) {
appBarLayout2.setExpanded(true, true);
}
Log.e("addBack", "addBackStackChangeListener");
c4(false);
C1();
this.i0.a.b.setVisibility(8);
if (fragment != null) {
boolean z2 = fragment instanceof s4.q;
}
g3();
return;
}
if (str.equalsIgnoreCase("Search_Revamp")) {
f0.Z(this.i0.a.s);
AppBarLayout appBarLayout3 = this.i0.a.q;
if (appBarLayout3 != null) {
appBarLayout3.setExpanded(true, true);
}
c4(false);
C1();
this.i0.a.b.setVisibility(8);
g3();
return;
}
if (str.equalsIgnoreCase("PREVIEW_FRAGMENT_TAG")) {
C1();
this.i0.a.b.setVisibility(8);
g3();
return;
}
g3();
q4();
if (f0.L0() != f0.Q0()) {
n.c(this, n.O2, "", "", (Content) null, f0.n1(f0.L0()), n.T2);
f0.v3(f0.L0());
}
if (str.equalsIgnoreCase("NEWS")) {
j4("NEWS", false);
Config config2 = this.y;
if (config2 == null || config2.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("Mint Shorts")) {
f4(true, "Mint Shorts");
Config config3 = this.y;
if (config3 == null || config3.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("VIDEOS")) {
j4("VIDEOS", false);
Config config4 = this.y;
if (config4 == null || config4.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("GLOBAL")) {
if (!(fragment instanceof HomeFragment) || (section = (homeFragment2 = (HomeFragment) fragment).section) == null || TextUtils.isEmpty(section.getDisplayName())) {
k4("GLOBAL", false, true);
} else {
k4(Q0(homeFragment2.section).toUpperCase(Locale.ENGLISH), false, true);
}
Config config5 = this.y;
if (config5 == null || config5.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("LATEST")) {
j4("LATEST", false);
Config config6 = this.y;
if (config6 == null || config6.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("TRENDING")) {
j4("TRENDING", false);
Config config7 = this.y;
if (config7 == null || config7.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("PREMIUM")) {
this.i0.a.b.setVisibility(0);
j4("PREMIUM", false);
return;
}
if (str.equalsIgnoreCase("Top News")) {
this.i0.a.b.setVisibility(0);
j4("Top News", false);
return;
}
if (str.equalsIgnoreCase("MY READS")) {
Config config8 = this.y;
if (config8 == null || !config8.isShowPremiumSection()) {
j4("MY READS", false);
} else {
f4(false, "MY READS");
}
Config config9 = this.y;
if (config9 != null && config9.getAdsAndroidNew() != null && this.y.getAdsAndroidNew().getBottomStickyAd() != null && this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() != null) {
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
}
if (fragment == null || !(fragment instanceof MyReadsFragment)) {
return;
}
((MyReadsFragment) fragment).getBookmarkAndHistoryData();
return;
}
if (str.equalsIgnoreCase("EXPLORE")) {
j4("EXPLORE", true);
B1();
this.i0.a.b.setVisibility(8);
n.A(this, n.U0, "Explore", "topic_page", (Content) null, (String) null);
return;
}
if (str.equalsIgnoreCase("Tag_Watch_List_Listing")) {
I0();
j4("watchlist".toUpperCase(), true);
Config config10 = this.y;
if (config10 == null || config10.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("Tag_Watch_Edit_List_Listing")) {
f4(false, "edit watchlist".toUpperCase());
Config config11 = this.y;
if (config11 == null || config11.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("EXPLORE APPS")) {
f4(false, "EXPLORE APPS");
return;
}
if (str.equalsIgnoreCase("CONTINUE_READ_VIEWALL_TAG")) {
f4(false, "Continue Reading");
if (fragment == null || !(fragment instanceof HomeFragment) || (q4Var = (homeFragment = (HomeFragment) fragment).recyclerViewAdapter) == null || !(q4Var instanceof q4)) {
return;
}
q4Var.D(AppController.O.g());
homeFragment.recyclerViewAdapter.notifyDataSetChanged();
return;
}
if (str.equalsIgnoreCase("Tag_Story_Detail")) {
p4();
this.i0.a.b.setVisibility(8);
if (fragment instanceof StoryDetailFragment) {
FragmentManager childFragmentManager = fragment.getChildFragmentManager();
StringBuilder sb = new StringBuilder();
sb.append("android:switcher:2131432063:");
StoryDetailFragment storyDetailFragment = (StoryDetailFragment) fragment;
sb.append(storyDetailFragment.getViewPagerCurrentItem());
StoryDetailViewFragment findFragmentByTag2 = childFragmentManager.findFragmentByTag(sb.toString());
if (findFragmentByTag2 instanceof StoryDetailViewFragment) {
StoryDetailViewFragment storyDetailViewFragment = findFragmentByTag2;
storyDetailViewFragment.updateYourData();
storyDetailViewFragment.getListSize();
storyDetailFragment.hideBottomAds();
yp0 yp0Var = storyDetailFragment.fragmentBinding;
if (yp0Var != null && (viewPager2 = yp0Var.a) != null && viewPager2.getAdapter() != null) {
this.i0.a.j.c(storyDetailFragment.fragmentBinding.a);
}
}
storyDetailFragment.showDiscountInCaseOfAlreadyShowing();
return;
}
return;
}
if (str.equalsIgnoreCase("NEWS_NUMBER_DETAIL_TAG")) {
p4();
B1();
w1();
NewsInNumberDetailsFragment newsInNumberDetailsFragment = (NewsInNumberDetailsFragment) fragment;
AppBarLayout appBarLayout4 = this.i0.a.q;
if (appBarLayout4 != null) {
appBarLayout4.setExpanded(true, true);
}
if (this.i0.a.j != null && newsInNumberDetailsFragment != null && (aiVar = newsInNumberDetailsFragment.binding) != null && (viewPager = aiVar.f) != null && viewPager.getAdapter() != null) {
this.i0.a.j.c(newsInNumberDetailsFragment.binding.f);
}
if (fragment instanceof NewsInNumberDetailsFragment) {
NewsInNumberDetailsFragment findFragmentByTag3 = fragment.getChildFragmentManager().findFragmentByTag("android:switcher:2131432063:" + ((NewsInNumberDetailsFragment) fragment).getViewPagerCurrentItem());
if (findFragmentByTag3 instanceof NewsInNumberDetailsFragment) {
findFragmentByTag3.datumList.size();
return;
}
return;
}
return;
}
if (str.equalsIgnoreCase("Tag_Section")) {
if (!(fragment instanceof HomeFragment)) {
f4(true, "");
return;
}
HomeFragment homeFragment4 = (HomeFragment) fragment;
String pageTittle = !TextUtils.isEmpty(homeFragment4.getPageTittle()) ? homeFragment4.getPageTittle() : "";
String deeplinkURL = TextUtils.isEmpty(homeFragment4.getDeeplinkURL()) ? "" : homeFragment4.getDeeplinkURL();
if (!TextUtils.isEmpty(deeplinkURL)) {
pageTittle = pageTittle + "#" + deeplinkURL;
}
f4(false, pageTittle);
return;
}
if (str.equalsIgnoreCase("Tag_Indice_News_Detail")) {
if (fragment instanceof HomeFragment) {
Section section2 = ((HomeFragment) fragment).section;
f4(false, section2 != null ? section2.getDisplayName() : "");
}
e4(true, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("Search") || str.equalsIgnoreCase("SearchDetail")) {
f4(false, "SEARCH");
e4(true, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
B1();
return;
}
if (str.equalsIgnoreCase("mintLounge")) {
f4(false, "Mint Lounge");
Config config12 = this.y;
if (config12 == null || config12.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("DE WIDGET") || str.equalsIgnoreCase("similar") || str.equalsIgnoreCase("most_pouplar")) {
if (fragment instanceof DEWidgetViewAllFragment) {
f4(false, ((DEWidgetViewAllFragment) fragment).getScreenName());
}
Config config13 = this.y;
if (config13 == null || config13.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("FOR YOU")) {
if (fragment instanceof HomeFragment) {
HomeFragment homeFragment5 = (HomeFragment) fragment;
f4(false, !TextUtils.isEmpty(homeFragment5.getPageTittle()) ? homeFragment5.getPageTittle() : "MY MINT");
} else {
f4(false, "MY MINT");
}
Config config14 = this.y;
String homeAdId2 = (config14 == null || config14.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null) ? "" : this.y.getAdsAndroidNew().getBottomStickyAd().getHomeAdId();
e4(false, TextUtils.isEmpty(homeAdId2) ? "" : homeAdId2, new Section());
return;
}
if (str.equalsIgnoreCase("MARKETS")) {
this.i0.a.b.setVisibility(0);
j4("MARKETS", false);
B1();
if (AppController.j().E()) {
this.i0.a.J.setTextColor(getResources().getColor(2131100951));
} else {
this.i0.a.J.setTextColor(getResources().getColor(2131101008));
}
if (fragment instanceof MarketDashboardNewFragment) {
MarketDashboardNewFragment marketDashboardNewFragment = (MarketDashboardNewFragment) fragment;
marketDashboardNewFragment.updateNightMood();
marketDashboardNewFragment.onResume();
sg sgVar = marketDashboardNewFragment.binding;
if (sgVar != null) {
ViewPager2 viewPager22 = sgVar.b;
if (viewPager22 != null && viewPager22.getCurrentItem() == 0) {
z = false;
}
V1(z);
}
if (this.i0.a.b.getMenu().findItem(401) == null) {
this.f.setTitle("Back");
this.i0.a.o.setVisibility(8);
this.i0.a.p.setVisibility(8);
return;
}
return;
}
return;
}
if (str.equalsIgnoreCase("Podcast")) {
f4(false, "PODCAST");
Config config15 = this.y;
if (config15 == null || config15.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("Saved For Later")) {
if (fragment != null && (fragment instanceof BookmarkFragment)) {
((BookmarkFragment) fragment).updateAndRefreshList();
}
f4(false, "Saved For Later");
Config config16 = this.y;
if (config16 == null || config16.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("Podcast_episode")) {
f4(false, "PODCAST EPISODES");
Config config17 = this.y;
if (config17 == null || config17.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("Tag_Mutual_Fund_Listing")) {
f4(false, "Mutual Funds");
Config config18 = this.y;
if (config18 == null || config18.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("Tag_Mutual_Fund_Detail")) {
f4(false, "");
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("Tag_Commodities_Detail")) {
f4(false, "");
e4(true, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("Infographics")) {
f4(false, "INFOGRAPHICS");
Config config19 = this.y;
if (config19 == null || config19.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("AUTHOR_DEATIL_FRAGMENT_TAG") && fragment != null && (fragment instanceof s4.c)) {
f4(false, "");
((s4.c) fragment).updateYourData();
return;
}
if (str.equalsIgnoreCase("Tag_Commodities_Detail")) {
f4(false, "");
e4(true, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("gainer_losers")) {
f4(false, "Gainer & Losers");
Config config20 = this.y;
if (config20 == null || config20.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("Tag_Watch_List_Listing")) {
I0();
f4(false, "");
Config config21 = this.y;
if (config21 == null || config21.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
return;
}
if (str.equalsIgnoreCase("NotificationCenter")) {
f4(false, "NOTIFICATIONS");
B1();
return;
}
if (str.equalsIgnoreCase("SILVER PRICES") || str.equalsIgnoreCase("GOLD PRICES")) {
f4(false, "SILVER PRICES");
this.i0.a.q.setExpanded(true, true);
this.i0.a.H.setVisibility(8);
} else {
if (str.equalsIgnoreCase("IndianIndices")) {
f4(false, "INDIAN INDICES");
return;
}
if (str.equalsIgnoreCase("MUTUAL_FUND_VIEW_ALL")) {
f4(false, "");
this.i0.a.H.setVisibility(8);
B1();
} else if (str.equalsIgnoreCase("Mint_piller_view_all_TAG")) {
f4(false, getResources().getString(2131952224));
} else {
B1();
this.i0.a.b.setVisibility(0);
}
}
}
}
private void Z2(Podcast podcast, Episode episode) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
PodcastDetailFragment podcastDetailFragment = new PodcastDetailFragment();
Bundle bundle = new Bundle();
if (podcast != null) {
bundle.putParcelable("Podcast", podcast);
}
if (episode != null) {
bundle.putParcelable("Podcast_episode", episode);
bundle.putBoolean("isEpisode", true);
}
podcastDetailFragment.setArguments(bundle);
bundle.putString("origin", "podcast_listing");
bundle.putBoolean("auto_play", true);
supportFragmentManager.beginTransaction().add(2131429286, podcastDetailFragment, "Podcast_episode").addToBackStack("Podcast_episode").commit();
}
public void a2(String str) {
int backStackEntryCount = getSupportFragmentManager().getBackStackEntryCount();
for (int i = 0; i < backStackEntryCount; i++) {
HomeTabViewFragment findFragmentByTag = getSupportFragmentManager().findFragmentByTag(getSupportFragmentManager().getBackStackEntryAt(i).getName());
if (findFragmentByTag instanceof HomeTabViewFragment) {
findFragmentByTag.setSelectedPageFromL1Menu(str);
return;
}
}
}
private void addBackStackChangeListener() {
t3(false);
z1(false);
x1();
getSupportFragmentManager().addOnBackStackChangedListener(new n0(this));
}
public void b2(h4.d dVar, AppController appController) {
if (!dVar.d() || dVar.h().c(true)) {
return;
}
try {
MobileAds.initialize(appController);
} catch (Exception e) {
n.A(this, "ADS_INIT_FAILED", "n/a", "Home", (Content) null, "home");
e.printStackTrace();
}
}
public void c2(Boolean bool) {
if (bool.booleanValue()) {
l.m(this, "IS_ONBOARDING_SYNC_COMPLETE", Boolean.TRUE);
this.z.t().f();
}
}
private void c3() {
MintSubscriptionDetail l = AppController.j().l();
if (l == null || !l.isSubscriptionActive() || l.getStoryId() == 0 || l.getStoryId() <= 0) {
return;
}
long storyId = l.getStoryId();
Bundle bundle = new Bundle();
bundle.putString("story_id", "" + storyId);
new m(this, getSupportFragmentManager(), bundle, this.n0, this.y);
l.setStoryId(0L);
}
public void i2() {
Config g = getApplication().g();
if (getIntent().getBooleanExtra("isUpdateNow", false)) {
r rVar = new r(this, this);
this.B = rVar;
rVar.e(0, "HomeActivity", "https://images.livemint.com/apps/v3/deviceconfig.json", false, false);
} else if (g != null) {
f0.y("", this.J, g.getContextualTarget_url());
if (l.j(this, "cdp_timestamp") == 0 || f0.M0(l.j(this, "cdp_timestamp"), System.currentTimeMillis()) >= 24) {
f0.x(this, this.K, g.getAdCampaign_url());
l.m(this, "cdp_timestamp", Long.valueOf(System.currentTimeMillis()));
}
u4(g);
} else {
r rVar2 = new r(this, this);
this.B = rVar2;
rVar2.e(0, "HomeActivity", "https://images.livemint.com/apps/v3/deviceconfig.json", false, false);
}
O1();
}
private void d1(boolean z, String str) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
if (supportFragmentManager.findFragmentByTag("mymint_tab") == null || !supportFragmentManager.getBackStackEntryAt(supportFragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("mymint_tab")) {
supportFragmentManager.beginTransaction().add(2131429286, v5.l.b0(z, str, this.l0), "mymint_tab").addToBackStack("mymint_tab").commitAllowingStateLoss();
}
this.l0 = false;
AppController.K = "My Mint";
AppController.L = "My Mint";
this.d = s0.t1.b();
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{"My Mint"});
}
public void d2(List list) {
if (l.a(this, "IS_ONBOARDING_SYNC_COMPLETE")) {
return;
}
if (list == null || list.isEmpty()) {
this.g0.a0().observe(this, new y0(this));
this.g0.f0(this, false, new b(this));
} else {
this.g0.c0().observe(this, new x0(this));
this.g0.z0(this, false);
}
}
public void e2(MintGenieResponse mintGenieResponse) {
if (mintGenieResponse == null || TextUtils.isEmpty(mintGenieResponse.getUserId())) {
return;
}
f0.W3(this, "mintgenieUserID", mintGenieResponse.getUserId());
this.g0.e0().set(mintGenieResponse.getUserId());
this.g0.g0();
}
private void e3() {
Bundle extras = getIntent() != null ? getIntent().getExtras() : null;
if (extras == null || !extras.containsKey("key_why_mint_subscribe_screen")) {
return;
}
this.d0 = extras.getBoolean("key_why_mint_subscribe_screen");
String string = extras.containsKey("key_why_mint_subscribe_screen") ? extras.getString("key_why_mint_subscribe_screen") : "";
String string2 = extras.containsKey("podcast_type") ? extras.getString("podcast_type") : "";
Podcast podcast = extras.containsKey("key_podcast_model") ? (Podcast) extras.getParcelable("key_podcast_model") : null;
if (podcast != null && string2.equalsIgnoreCase("podcast_actual")) {
Z2(podcast, null);
} else if (string2.equalsIgnoreCase("podcast_explore")) {
Y2(string);
}
}
public void f2(Boolean bool) {
if (bool.booleanValue()) {
l.m(this, "IS_ONBOARDING_SYNC_COMPLETE", Boolean.TRUE);
this.z.t().f();
}
}
public void f3(JSONObject jSONObject) {
DeviceEligibilityPojo deviceEligibilityPojo;
DeviceEligibilityData data;
if (jSONObject == null || (deviceEligibilityPojo = (DeviceEligibilityPojo) new Gson().fromJson(jSONObject.toString(), DeviceEligibilityPojo.class)) == null || (data = deviceEligibilityPojo.getData()) == null) {
return;
}
OfferBannerSingleton.getInstance().setDeviceEligibilityData(data);
}
public void g2() {
if (O0) {
return;
}
String stringExtra = (getIntent() == null || !getIntent().hasExtra("url")) ? "" : getIntent().getStringExtra("url");
if (TextUtils.isEmpty(stringExtra) || !stringExtra.contains(s0.K1.b())) {
return;
}
if (TextUtils.isEmpty(stringExtra) || !stringExtra.contains("giftCode")) {
T2();
} else {
L2();
}
}
private void g3() {
new Thread((Runnable) new b0(this)).start();
}
public void h1() {
if (P0) {
String stringExtra = (getIntent() == null || !getIntent().hasExtra("url")) ? "" : getIntent().getStringExtra("url");
if (!TextUtils.isEmpty(stringExtra) && stringExtra.contains(s0.K1.b())) {
if (TextUtils.isEmpty(stringExtra) || !stringExtra.contains("giftCode")) {
T2();
} else {
L2();
}
}
P0 = false;
O0 = false;
}
}
public void h2(String str) {
if (O0) {
return;
}
if (str.equalsIgnoreCase("Subscribe Now Subs")) {
X2("my_account_deeplink_gift_sub");
} else {
P2("my_account_deeplink_gift_sub");
}
}
private void h3() {
String name;
try {
int backStackEntryCount = getSupportFragmentManager().getBackStackEntryCount() - 1;
if (backStackEntryCount < 0 || (name = getSupportFragmentManager().getBackStackEntryAt(backStackEntryCount).getName()) == null || !name.equalsIgnoreCase("Tag_Story_Detail")) {
return;
}
getSupportFragmentManager().popBackStack();
} catch (Exception unused) {
}
}
private void i1(FragmentManager fragmentManager) {
boolean z;
Section section;
x1();
Config config = this.y;
if (config == null || config.getBottomItemsUpgradeAndroid() == null) {
z = false;
} else {
z = false;
for (int i = 0; i < this.y.getBottomItemsUpgradeAndroid().size(); i++) {
int i2 = 0;
while (true) {
if (i2 >= ((ArrayList) this.y.getBottomItemsUpgradeAndroid().get(i)).size()) {
break;
}
if ("global_tab".equalsIgnoreCase((String) ((ArrayList) this.y.getBottomItemsUpgradeAndroid().get(i)).get(i2))) {
z = true;
break;
}
i2++;
}
if (z) {
break;
}
}
}
if (z) {
section = U0("global_tab", this.y);
if (section != null && !TextUtils.isEmpty(section.getTabImageId()) && section.getTabImageId().toLowerCase(Locale.ENGLISH).contains("global")) {
if (AppController.j().E()) {
BottomNavigationView bottomNavigationView = this.i0.a.b;
bottomNavigationView.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView.getContext(), 2131231605));
} else {
BottomNavigationView bottomNavigationView2 = this.i0.a.b;
bottomNavigationView2.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView2.getContext(), 2131231604));
}
}
} else {
Section section2 = new Section();
section2.setUrl(AppController.j().g().getServerUrl() + this.y.getGlobalUrl());
section2.setDisplayHeader("Global");
section2.setDisplayName("Global");
section2.setTabImageId("global");
section2.setId("global_tab");
section = section2;
}
HomeFragment homeFragment = new HomeFragment();
Bundle bundle = new Bundle();
bundle.putParcelable("top_section_section", section);
homeFragment.setArguments(bundle);
fragmentManager.beginTransaction().add(2131429286, homeFragment, "GLOBAL").addToBackStack("GLOBAL").commitAllowingStateLoss();
AppController.L = AppController.K;
AppController.K = Q0(section);
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{section.getDisplayName()});
Config config2 = this.y;
if (config2 == null || config2.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
}
private void i3() {
new Thread((Runnable) new m0(this)).start();
}
private void i4(String str) {
boolean isSubscribedUser = CheckSubscriptionFromLocal.isSubscribedUser(this);
DeviceEligibilityData deviceEligibilityData = OfferBannerSingleton.getInstance().getDeviceEligibilityData();
boolean z = deviceEligibilityData != null && deviceEligibilityData.isEligible();
if (isSubscribedUser || !z) {
this.i0.a.v.setVisibility(8);
} else {
this.i0.a.v.setVisibility(0);
}
if ("EXPLORE".equalsIgnoreCase(str)) {
this.M.hideCrossButton();
} else {
this.M.showCrossButton();
}
}
public void j2(View view) {
onOptionsItemSelected(this.U);
}
public void k2(View view) {
onOptionsItemSelected(this.T);
}
private void l1() {
boolean booleanExtra = getIntent().getBooleanExtra("go_to_premium_tab", false);
String stringExtra = getIntent().getStringExtra("link");
if (booleanExtra) {
if (stringExtra.equalsIgnoreCase("https://www.livemint.com/premium")) {
new Handler().postDelayed(new g0(this), 1000L);
} else {
j1.U(this, stringExtra);
}
}
}
public void l2() {
a.f().g(this);
a.f().j(this, hd.b.c);
}
private void l4() {
Bundle extras = getIntent() != null ? getIntent().getExtras() : null;
if (extras != null && extras.containsKey("IS_BUDGET") && extras.getBoolean("IS_BUDGET")) {
return;
}
if (f0.m2(this, AppController.j().l())) {
e eVar = new e();
eVar.b("Platform", "Android");
eVar.b("Domain", "LM");
k6.c cVar = new k6.c(this, new k(this, eVar));
Config g = AppController.j().g();
if (g != null && g.getSso() != null && !TextUtils.isEmpty(g.getSso().getSsoBaseUrl()) && g.getRazorpay() != null && g.getRazorpay().getAuto_renew() != null) {
HashMap hashMap = new HashMap();
hashMap.put("X-Client", "1002");
hashMap.put("Authorization", f0.G1(AppController.j(), "userToken"));
cVar.b(g.getSso().getSsoBaseUrl() + g.getRazorpay().getAuto_renew().getMandateUrl(), "popupmandate", hashMap);
}
}
W2();
}
private void m4(String str) {
t7.u uVar = new t7.u();
uVar.J(this, str);
uVar.show(getSupportFragmentManager(), "giftArticle");
uVar.setCancelable(true);
}
public void n2(View view) {
this.O.w();
f0.B3(this, true);
}
public void o2(View view) {
this.N.w();
f fVar = this.O;
if (fVar != null) {
fVar.C();
} else {
f0.B3(this, true);
}
}
private void o3(Config config) {
try {
int i = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;
config.getAndroidCode();
if (i < config.getAndroidMinVer()) {
B0(this, getString(2131952652));
} else if (Q1(config) && (l.j(this, "app_update_timestamp") == 0 || f0.M0(l.j(this, "app_update_timestamp"), System.currentTimeMillis()) >= 48)) {
InAppUpdateManager mode = InAppUpdateManager.Builder(this, 1001).resumeUpdates(true).mode(Constants.UpdateMode.IMMEDIATE);
this.G = mode;
mode.checkForAppUpdate();
}
} catch (Exception unused) {
}
}
private void p1(String str) {
new Handler(Looper.getMainLooper()).postDelayed(new g1(this, str), 700L);
}
public void p2(View view) {
this.N.w();
f0.B3(this, true);
}
private void q1(Bundle bundle) {
if (bundle.containsKey("isNotification") && bundle.getInt("isNotification") == q.m.e.ordinal() && bundle.containsKey("notification_Id")) {
String string = bundle.getString("notification_Id");
f6.j.a(this, string);
f6.j.b(this, string);
l.m(this, "notification_Id", string);
bundle.putInt("isNotification", q.m.a.ordinal());
getIntent().putExtras(bundle);
}
}
public void q2(View view) {
Config config = this.y;
if (config != null && config.getHomeMenuSection() != null && this.y.getHomeMenuSection().size() > 0) {
k3();
}
j3();
this.Q.w();
f fVar = this.N;
if (fVar != null) {
fVar.C();
}
}
private void r1() {
Bundle extras = getIntent().getExtras();
if (!TextUtils.isEmpty(WebEngageAnalytices.VALUE_CAMPAIGN_SOURCE)) {
AppController.L = WebEngageAnalytices.VALUE_CAMPAIGN_SOURCE;
return;
}
if (extras == null || !extras.containsKey("isNotification")) {
AppController.L = "Organic";
} else if (extras.getInt("isNotification") == q.m.d.ordinal()) {
AppController.L = "Deeplink";
} else if (extras.getInt("isNotification") == q.m.e.ordinal()) {
AppController.L = "Notification";
}
}
public void r2(View view) {
this.Q.w();
f0.B3(this, true);
}
private void r3() {
new Thread((Runnable) new c0(this)).start();
}
public void s2(View view) {
this.P.w();
f0.B3(this, true);
}
private void stopTimer() {
HomeActivityTimer homeActivityTimer = this.p0;
if (homeActivityTimer != null) {
homeActivityTimer.stopTimer();
}
}
public void t2(View view) {
this.P.w();
f0.B3(this, true);
}
private boolean t4() {
Config config = this.y;
return (config == null || config.getMywatchlist() == null || !this.y.getMywatchlist().isEnableWatchistAndroid()) ? false : true;
}
public void u2(View view) {
Config config = this.y;
if (config != null && config.getHomeMenuSection() != null && this.y.getHomeMenuSection().size() > 0) {
l3();
}
this.P.w();
f fVar = this.Q;
if (fVar != null) {
fVar.C();
}
}
private void u4(Config config) {
this.y = config;
E3(config);
o3(config);
M1(config);
}
private void v0() {
invalidateOptionsMenu();
p3();
if (AppController.j().E()) {
if (AppController.j().l() == null || !AppController.j().l().isSubscriptionActive()) {
Config g = AppController.j().g();
this.y = g;
if (g == null || g.getDynamicLogoChange() == null || !this.y.getDynamicLogoChange().isTopHeaderLogoEnable()) {
this.i0.a.g.setImageDrawable(getResources().getDrawable(2131233472));
return;
} else {
G3(this.y, false);
return;
}
}
Config g2 = AppController.j().g();
this.y = g2;
if (g2 == null || g2.getDynamicLogoChange() == null || !this.y.getDynamicLogoChange().isTopHeaderLogoEnable()) {
this.i0.a.g.setImageDrawable(getResources().getDrawable(2131232639));
return;
} else {
G3(this.y, true);
return;
}
}
if (AppController.j().l() == null || !AppController.j().l().isSubscriptionActive()) {
Config g3 = AppController.j().g();
this.y = g3;
if (g3 == null || g3.getDynamicLogoChange() == null || !this.y.getDynamicLogoChange().isTopHeaderLogoEnable()) {
this.i0.a.g.setImageDrawable(getResources().getDrawable(2131233472));
return;
} else {
G3(this.y, false);
return;
}
}
Config g4 = AppController.j().g();
this.y = g4;
if (g4 == null || g4.getDynamicLogoChange() == null || !this.y.getDynamicLogoChange().isTopHeaderLogoEnable()) {
this.i0.a.g.setImageDrawable(getResources().getDrawable(2131232638));
} else {
G3(this.y, true);
}
}
public void v2(View view) {
this.P.w();
f0.B3(this, true);
}
private void v4(long j, Pattern pattern, boolean z) {
this.s0 = new u(this, j, 1000L, pattern, z).start();
this.k0 = true;
}
private void w0(MenuItem menuItem) {
try {
Typeface font = ResourcesCompat.getFont(this, 2131296270);
SpannableString spannableString = new SpannableString(menuItem.getTitle());
spannableString.setSpan(new CustomTypefaceSpan("", font), 0, spannableString.length(), 18);
menuItem.setTitle(spannableString);
} catch (Exception e) {
e.printStackTrace();
com.htmedia.mint.utils.o0.g(e, getClass().getSimpleName());
}
}
public void w2(PremiumOffer premiumOffer, View view) {
t0.a(this, premiumOffer.getDeeplink());
}
private void w4(String str, Content content, boolean z) {
long j;
Pattern compile = Pattern.compile("\\{[^\\}]*\\}");
try {
j = new SimpleDateFormat("dd/MM/yyy HH:mm:ss").parse(str).getTime() - Calendar.getInstance(TimeZone.getTimeZone("gmt")).getTime().getTime();
} catch (ParseException e) {
e.printStackTrace();
j = 0;
}
if (j > 0) {
CountDownTimer countDownTimer = this.s0;
if (countDownTimer == null) {
v4(j, compile, z);
return;
}
synchronized (countDownTimer) {
this.s0.cancel();
this.s0 = null;
v4(j, compile, z);
}
return;
}
CountDownTimer countDownTimer2 = this.s0;
if (countDownTimer2 != null) {
synchronized (countDownTimer2) {
this.s0.cancel();
this.s0 = null;
}
}
this.k0 = false;
this.i0.a.t.b.setVisibility(8);
if (z) {
s4(content);
}
}
private void x0() {
ArrayList<NativeAdsPojo> arrayList = H0;
if (arrayList != null) {
arrayList.clear();
}
}
private void x1() {
MenuItem menuItem = this.U;
if (menuItem != null && this.T != null && this.i0.a.I != null) {
menuItem.setVisible(false);
this.T.setVisible(false);
this.i0.a.J.setVisibility(8);
this.i0.a.J.setText("");
}
A1();
}
public void x2(h4.d dVar, AppController appController, FormError formError) {
P1(dVar, appController);
}
private void x3() {
Toolbar toolbar = this.f;
if (toolbar != null) {
toolbar.setTitle("Back");
this.i0.a.o.setVisibility(8);
this.f.setNavigationOnClickListener(new p(this));
if (this.f.getTitle() != null) {
String charSequence = this.f.getTitle().toString();
for (int i = 0; i < this.f.getChildCount(); i++) {
AppCompatTextView childAt = this.f.getChildAt(i);
if ("androidx.appcompat.widget.AppCompatTextView".equals(childAt.getClass().getName())) {
AppCompatTextView appCompatTextView = childAt;
if (appCompatTextView.getText().equals(charSequence)) {
appCompatTextView.setTypeface(ResourcesCompat.getFont(this, 2131296270));
appCompatTextView.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
appCompatTextView.setCompoundDrawablePadding(0);
childAt.setOnClickListener(new q(this));
}
}
}
}
if (AppController.j().E()) {
this.f.setTitleTextColor(ResourcesCompat.getColor(getResources(), 2131101009, (Resources.Theme) null));
this.i0.a.H.setTextColor(ResourcesCompat.getColor(getResources(), 2131101009, (Resources.Theme) null));
this.i0.a.H.setBackgroundColor(ResourcesCompat.getColor(getResources(), 2131100008, (Resources.Theme) null));
this.f.setNavigationIcon(2131231333);
return;
}
this.f.setTitleTextColor(ResourcesCompat.getColor(getResources(), 2131101008, (Resources.Theme) null));
this.i0.a.H.setTextColor(ResourcesCompat.getColor(getResources(), 2131101008, (Resources.Theme) null));
this.i0.a.H.setBackgroundColor(ResourcesCompat.getColor(getResources(), 2131101002, (Resources.Theme) null));
this.f.setNavigationIcon(2131231330);
}
}
private void y0() {
String G1 = f0.G1(this, "userName");
String F1 = f0.F1(this);
String G12 = f0.G1(this, "userClient");
String G13 = f0.G1(this, "userPhoneNumber");
if (TextUtils.isEmpty(G12)) {
return;
}
if (TextUtils.isEmpty(G1)) {
G1 = "";
}
if (TextUtils.isEmpty(F1)) {
F1 = "";
}
this.g0.E0(G1, F1, G13, G12);
}
public void y2() {
this.f.setContentInsetStartWithNavigation(0);
setSupportActionBar(this.f);
getSupportActionBar().setDisplayShowTitleEnabled(false);
Log.i("HomeActivity", "setupToolbarAndDrawer() Executed");
}
private void y3(String str, Section section) {
if (this.y == null) {
this.y = AppController.j().g();
}
Config config = this.y;
BottomStickyAd bottomStickyAd = (config == null || config.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null) ? null : this.y.getAdsAndroidNew().getBottomStickyAd();
if (section != null && section.getDisplayName() != null && !TextUtils.isEmpty(section.getDisplayName())) {
String F1 = F1(section.getDisplayName());
if (!TextUtils.isEmpty(F1)) {
str = F1;
}
}
if (TextUtils.isEmpty(str) || (!((this.i0.a.b.getVisibility() == 0 && bottomStickyAd != null && bottomStickyAd.getEnableForBottomBar()) || (this.i0.a.b.getVisibility() == 8 && bottomStickyAd != null && bottomStickyAd.getEnableForWithoutBottomBar())) || (!f0.P1() && (f0.O1() || CheckSubscriptionFromLocal.isAdFreeSubscribedUser(this))))) {
this.i0.a.x.removeAllViews();
this.i0.a.x.setVisibility(8);
return;
}
this.i0.a.x.removeAllViews();
this.i0.a.z.setVisibility(0);
this.i0.a.x.setVisibility(0);
this.i0.a.x.addView(com.htmedia.mint.utils.k.q(this.V, this, str, section));
o1.a("Ads ID : ", str);
}
private void z0() {
String G1 = f0.G1(this, "mintgenieUserID");
if (TextUtils.isEmpty(G1)) {
this.g0.e0().set("");
y0();
} else {
this.g0.e0().set(G1);
this.g0.g0();
}
}
public void z2(View view) {
HomeTabViewFragment findFragmentById;
com.htmedia.mint.utils.m.i(true);
this.i0.a.x.setVisibility(8);
this.i0.a.h.setVisibility(8);
this.i0.a.z.setVisibility(8);
if (!(getSupportFragmentManager().findFragmentById(2131429286) instanceof HomeTabViewFragment) || (findFragmentById = getSupportFragmentManager().findFragmentById(2131429286)) == null) {
return;
}
findFragmentById.setHomePageListPadding();
}
private void z3(String str) {
if (TextUtils.isEmpty(str) || (!f0.P1() && (f0.O1() || CheckSubscriptionFromLocal.isAdFreeSubscribedUser(this)))) {
this.i0.a.x.removeAllViews();
this.i0.a.x.setVisibility(8);
return;
}
this.i0.a.x.removeAllViews();
this.i0.a.z.setVisibility(0);
this.i0.a.x.setVisibility(0);
this.i0.a.x.addView(com.htmedia.mint.utils.k.p(this.V, this, str));
o1.a("Ads ID : ", str);
}
public void A0(boolean z) {
if (z) {
this.i0.j.setBackground(getResources().getDrawable(2131231714));
this.i0.q.setTextColor(getResources().getColor(2131101012));
this.i0.a.y.setBackgroundColor(getResources().getColor(2131101012));
this.i0.a.x.setBackgroundColor(getResources().getColor(2131101012));
this.i0.a.h.setImageResource(2131232351);
this.i0.f.setImageResource(2131232352);
this.i0.a.C.setBackground(ContextCompat.getDrawable(this, 2131231336));
this.i0.a.B.setTextColor(getResources().getColor(2131100968));
return;
}
this.i0.j.setBackground(getResources().getDrawable(2131231713));
this.i0.q.setTextColor(getResources().getColor(2131101002));
this.i0.a.y.setBackgroundColor(getResources().getColor(2131101002));
this.i0.a.x.setBackgroundColor(getResources().getColor(2131101002));
this.i0.a.h.setImageResource(2131232352);
this.i0.f.setImageResource(2131232350);
this.i0.a.C.setBackground(ContextCompat.getDrawable(this, 2131231339));
this.i0.a.B.setTextColor(getResources().getColor(2131100598));
}
public void A1() {
this.i0.a.y.setVisibility(8);
}
public void A3(int i, boolean z) {
BottomNavigationView bottomNavigationView = this.i0.a.b;
MenuItem findItem = (bottomNavigationView == null || bottomNavigationView.getMenu() == null) ? null : this.i0.a.b.getMenu().findItem(i);
if (findItem != null) {
findItem.setChecked(z);
}
}
public void B1() {
this.i0.a.x.setVisibility(8);
this.i0.a.h.setVisibility(8);
}
public void C1() {
CoordinatorLayout.LayoutParams layoutParams = this.i0.a.q.getLayoutParams();
((ViewGroup.MarginLayoutParams) layoutParams).height = 0;
this.i0.a.q.setLayoutParams(layoutParams);
}
public void C2() {
boolean z = f0.G1(this, "userToken") != null;
r4 n = getApplication().n();
this.g0 = n;
n.H0(f0.r0());
if (!z || l.a(this, "IS_ONBOARDING_SYNC_COMPLETE")) {
return;
}
this.g0.x0().set(true);
this.g0.v0(f0.G1(this, "userToken"), f0.G1(this, "userClient"));
z0();
this.g0.o0().observe(this, new p0(this));
this.g0.d0().observe(this, new r0(this));
}
public void C3(PremiumOffer premiumOffer, Content content, boolean z) {
if (premiumOffer != null) {
if (!TextUtils.isEmpty(premiumOffer.getTitle())) {
this.i0.a.u.c.setText(Html.fromHtml(premiumOffer.getTitle()));
}
this.t0 = premiumOffer.getCountdownText();
if (!TextUtils.isEmpty(premiumOffer.getOfferEndDateGmt())) {
w4(premiumOffer.getOfferEndDateGmt(), content, z);
}
this.i0.a.u.a.setText(premiumOffer.getCtaTitle());
this.i0.a.u.a.setOnClickListener(new q0(this, premiumOffer));
}
}
public void D1() {
this.i0.a.C.setVisibility(4);
}
public void D3(j1 j1Var) {
this.m0 = j1Var;
}
public void E0(Bundle bundle, int i) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
if (bundle.containsKey("CONTINUE_READ_ALL_KEY")) {
if (AppController.O.g().isEmpty()) {
return;
}
HomeFragment homeFragment = new HomeFragment();
Bundle bundle2 = new Bundle();
bundle2.putBoolean("CONTINUE_READ_ALL_KEY", true);
homeFragment.setArguments(bundle2);
supportFragmentManager.beginTransaction().add(2131429286, homeFragment, "CONTINUE_READ_VIEWALL_TAG").addToBackStack("CONTINUE_READ_VIEWALL_TAG").commitAllowingStateLoss();
return;
}
int i2 = 0;
if (bundle.containsKey("searchKeyword")) {
y6.c cVar = new y6.c();
cVar.setArguments(bundle);
supportFragmentManager.beginTransaction().add(2131429286, cVar, "Search_Revamp").addToBackStack("Search_Revamp").commitAllowingStateLoss();
f4(false, "");
return;
}
if (bundle.containsKey("NotificationCenter")) {
V2();
return;
}
if (bundle.containsKey("Podcast")) {
String string = bundle.getString("url");
if (!bundle.containsKey("podcast_id")) {
if (!W1(string)) {
Y2("home");
return;
}
String queryParameter = Uri.parse(string).getQueryParameter("episode");
Episode episode = new Episode();
episode.setId(Integer.parseInt(queryParameter));
Z2(null, episode);
return;
}
if (!W1(string)) {
String string2 = bundle.getString("podcast_id");
Podcast podcast = new Podcast();
try {
i2 = Integer.parseInt(string2);
} catch (NumberFormatException unused) {
}
podcast.setId(i2);
Z2(podcast, null);
return;
}
try {
String string3 = bundle.getString("podcast_id");
String T0 = T0(string);
Episode episode2 = new Episode();
episode2.setId(Integer.parseInt(string3));
Podcast podcast2 = new Podcast();
podcast2.setId(Integer.parseInt(T0));
Z2(podcast2, episode2);
return;
} catch (Exception unused2) {
return;
}
}
if (bundle.containsKey("IS_BUDGET") && bundle.getString("BUDGET_URL") != null) {
String string4 = bundle.getString("BUDGET_URL", "");
if (TextUtils.isEmpty(string4)) {
return;
}
f0.z2(this, f0.v(string4, this));
return;
}
if (bundle.containsKey("NEWS_IN_NUMBER")) {
e1(bundle);
return;
}
if (bundle.containsKey("watchlist")) {
d3();
return;
}
if (bundle.containsKey("bse_top_gainers")) {
j1.m0(this, U0("market_page", this.y), q.c0.f.a(), true);
return;
}
if (bundle.containsKey("nse_top_gainers")) {
j1.m0(this, U0("market_page", this.y), q.c0.f.a(), false);
return;
}
if (bundle.containsKey("bse_top_losers")) {
j1.m0(this, U0("market_page", this.y), q.c0.g.a(), true);
return;
}
if (bundle.containsKey("nse_top_losers")) {
j1.m0(this, U0("market_page", this.y), q.c0.g.a(), false);
return;
}
if (bundle.containsKey("short-term-bearish")) {
j1.m0(this, U0("market_page", this.y), q.c0.d.a(), true);
return;
}
if (bundle.containsKey("long-term-bearish")) {
j1.m0(this, U0("market_page", this.y), q.c0.d.a(), false);
return;
}
if (bundle.containsKey("short-term-bullish")) {
j1.m0(this, U0("market_page", this.y), q.c0.c.a(), true);
return;
}
if (bundle.containsKey("long-term-bullish")) {
j1.m0(this, U0("market_page", this.y), q.c0.c.a(), false);
return;
}
if (bundle.containsKey("nse_52_week_low")) {
j1.m0(this, U0("market_page", this.y), q.c0.i.a(), false);
return;
}
if (bundle.containsKey("nse_52_week_high")) {
j1.m0(this, U0("market_page", this.y), q.c0.h.a(), false);
return;
}
if (bundle.containsKey("nse_volume_shokers")) {
j1.m0(this, U0("market_page", this.y), q.c0.j.a(), false);
return;
}
if (bundle.containsKey("bse_volume_shokers")) {
j1.m0(this, U0("market_page", this.y), q.c0.j.a(), true);
return;
}
if (bundle.containsKey("nse_price_shokers")) {
j1.m0(this, U0("market_page", this.y), q.c0.o.a(), false);
return;
}
if (bundle.containsKey("bse_price_shokers")) {
j1.m0(this, U0("market_page", this.y), q.c0.o.a(), true);
return;
}
if (bundle.containsKey("bse_52_week_low")) {
j1.m0(this, U0("market_page", this.y), q.c0.i.a(), true);
return;
}
if (bundle.containsKey("bse_52_week_high")) {
j1.m0(this, U0("market_page", this.y), q.c0.h.a(), true);
return;
}
if (bundle.containsKey("market_mutual_fund_tab") || bundle.containsKey("stocks_to_buy") || bundle.containsKey("followed_stocks")) {
a1(getSupportFragmentManager());
return;
}
if (bundle.containsKey("most_active_by_volume_bse")) {
j1.m0(this, U0("market_page", this.y), q.c0.e.a(), true);
return;
}
if (bundle.containsKey("most_active_by_volume_nse")) {
j1.m0(this, U0("market_page", this.y), q.c0.e.a(), false);
return;
}
if (bundle.containsKey("market_stocks")) {
j1.t0(this, bundle.getString("url"));
return;
}
if (bundle.containsKey("market_mutual_fund")) {
j1.n0(this, bundle.getString("url"), i);
return;
}
if (bundle.containsKey("MINT_SPECIALS_KEY")) {
Q2();
return;
}
if (bundle.containsKey("Predict")) {
startActivity(new Intent((Context) this, (Class<?>) PredictionLeaderBoardActivity.class));
return;
}
if (bundle.containsKey("VIDEOS")) {
f1(getSupportFragmentManager());
return;
}
if (bundle.containsKey("ECONOMIST_KEY")) {
g1(getSupportFragmentManager());
return;
}
if (bundle.containsKey("GLOBAL_KEY")) {
i1(getSupportFragmentManager());
return;
}
if (bundle.containsKey("QUICK_READ_KEY")) {
j1(getSupportFragmentManager());
return;
}
if (bundle.containsKey("TOP_NEWS_KEY")) {
n1(getSupportFragmentManager());
return;
}
if (bundle.containsKey("WSJ_KEY")) {
Section wsjSection = this.y.getWsjSection();
wsjSection.setWsj(true);
wsjSection.getTemplate();
b3(wsjSection);
return;
}
if (bundle.containsKey("info_graphics_origin")) {
N2(bundle.getString("url"));
} else if (bundle.containsKey("deeplinkpage")) {
C0();
} else {
B2(supportFragmentManager, bundle, i);
}
}
public void E1() {
this.i0.a.A.setVisibility(8);
}
public void F3(boolean z) {
}
public void G0(boolean z) {
AppBarLayout.LayoutParams layoutParams = this.f.getLayoutParams();
ViewGroup.LayoutParams layoutParams2 = (CoordinatorLayout.LayoutParams) this.i0.a.q.getLayoutParams();
if (z) {
layoutParams.setScrollFlags(0);
layoutParams2.setBehavior((CoordinatorLayout.Behavior) null);
this.i0.a.q.setLayoutParams(layoutParams2);
} else {
layoutParams.setScrollFlags(5);
layoutParams2.setBehavior(new AppBarLayout.Behavior());
this.i0.a.q.setLayoutParams(layoutParams2);
}
}
public void G3(Config config, boolean z) {
try {
m1.b(this, z, this.i0.a.g, config);
} catch (Exception unused) {
}
}
public void H0() {
f fVar = this.P;
if (fVar != null && fVar.isShown()) {
this.P.w();
}
f fVar2 = this.O;
if (fVar2 != null && fVar2.isShown()) {
this.O.w();
}
f fVar3 = this.N;
if (fVar3 == null || !fVar3.isShown()) {
return;
}
this.N.w();
}
public void H3(String str) {
this.W = str;
if (this.s != null) {
if (AppController.O.a(str)) {
if (this.s != null) {
if (AppController.j().E()) {
I3(2131232312);
return;
} else {
I3(2131231597);
return;
}
}
return;
}
if (this.s != null) {
if (AppController.j().E()) {
I3(2131232316);
} else {
I3(2131232311);
}
}
}
}
public void I0() {
AppBarLayout appBarLayout = this.i0.a.q;
if (appBarLayout != null) {
appBarLayout.setExpanded(true, true);
}
}
public void I2() {
String string;
ArrayList arrayList = null;
Bundle extras = getIntent() != null ? getIntent().getExtras() : null;
if (extras != null) {
if (extras.containsKey("keyDailyDigestScreen") || extras.containsKey("key_infographics")) {
this.Z = extras.containsKey("keyDailyDigestScreen") && extras.getBoolean("keyDailyDigestScreen");
boolean z = extras.containsKey("key_IS_infographics") && extras.getBoolean("key_IS_infographics");
this.a0 = z;
if (this.Z) {
string = extras.containsKey("keyDailyDigestOrigin") ? extras.getString("keyDailyDigestOrigin") : "";
if (getIntent() != null && getIntent().hasExtra("content_list")) {
arrayList = getIntent().getParcelableArrayListExtra("content_list");
}
if (arrayList == null || arrayList.isEmpty()) {
return;
}
int i = extras.containsKey("keyDailyDigestPosition") ? extras.getInt("keyDailyDigestPosition") : 0;
Content content = (Content) arrayList.get(i);
Bundle bundle = new Bundle();
bundle.putString(n.Y, string);
bundle.putInt("pos", i);
g7.a.u(this, bundle, content, arrayList);
return;
}
if (z) {
String string2 = extras.containsKey("urlkey") ? extras.getString("urlkey") : "";
String string3 = extras.containsKey("storyId") ? extras.getString("storyId") : "";
string = extras.containsKey("key_infographics") ? extras.getString("key_infographics") : "";
Bundle bundle2 = new Bundle();
bundle2.putString(n.Y, string);
Content content2 = new Content();
try {
if (!TextUtils.isEmpty(string3) && f0.X1(string3)) {
content2.setId(Long.parseLong(string3));
}
} catch (Exception e) {
e.printStackTrace();
}
Metadata metadata = new Metadata();
metadata.setUrl(string2);
content2.setMetadata(metadata);
g7.a.u(this, bundle2, content2, (List) null);
}
}
}
}
public void J0() {
if (this.X == null) {
this.X = new s6.c(this, this);
}
this.X.j(j.c.getId() + "");
this.X.g(j.c);
String G1 = f0.G1(this, "userClient");
Config g = AppController.j().g();
String replace = ((g == null || g.getSubscription() == null) ? "" : g.getSubscription().getArticleHistory()).replace("{fingerprint}", f6.d.b(this));
String replace2 = !TextUtils.isEmpty(G1) ? replace.replace("{clientId}", G1) : replace.replace("&clientId={clientId}", "");
HashMap hashMap = new HashMap();
hashMap.put("Domain", "lm");
this.X.a(0, "PremiumStoryCounter", replace2, (JSONObject) null, hashMap, false, true);
}
public void J2(String str) {
String str2 = "";
if (TextUtils.isEmpty(str)) {
str = "";
}
Config g = AppController.j().g();
if (g != null && g.getEpaper() != null) {
str2 = g.getEpaper().getUrl();
}
if (TextUtils.isEmpty(str2)) {
return;
}
if (!str2.startsWith("http")) {
str2 = AppController.j().g().getServerUrl() + str2;
}
f0.e = "Header";
f0.A2(this, str2 + str);
}
public void J3() {
boolean E = AppController.j().E();
v5.l.x.a().set(E);
AppController.W.set(E);
if (E) {
getWindow().setStatusBarColor(-16777216);
getWindow().getDecorView().setSystemUiVisibility(0);
if (this.f == null) {
L1();
}
this.f.setBackgroundColor(getResources().getColor(2131100916));
this.i0.a.H.setBackgroundColor(getResources().getColor(2131100916));
this.i0.a.K.setBackgroundColor(getResources().getColor(2131100977));
this.i0.a.L.setBackgroundColor(getResources().getColor(2131100977));
this.i0.a.b.setBackgroundColor(getResources().getColor(2131101012));
BottomNavigationView bottomNavigationView = this.i0.a.b;
bottomNavigationView.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView.getContext(), 2131231606));
BottomNavigationView bottomNavigationView2 = this.i0.a.b;
bottomNavigationView2.setItemTextColor(ContextCompat.getColorStateList(bottomNavigationView2.getContext(), 2131231606));
findViewById(2131429286).setBackgroundColor(getResources().getColor(2131100945));
this.i0.a.p.setImageDrawable(ContextCompat.getDrawable(this, 2131232521));
this.i0.a.o.setImageDrawable(ContextCompat.getDrawable(this, 2131232351));
} else {
getWindow().setStatusBarColor(-1);
getWindow().getDecorView().setSystemUiVisibility(8192);
if (this.f == null) {
L1();
}
this.f.setBackgroundColor(getResources().getColor(2131101002));
this.i0.a.H.setBackgroundColor(getResources().getColor(2131101002));
findViewById(2131429286).setBackgroundColor(getResources().getColor(2131101002));
this.i0.a.K.setBackgroundColor(getResources().getColor(2131100976));
this.i0.a.L.setBackgroundColor(getResources().getColor(2131100976));
this.i0.a.b.setBackgroundColor(getResources().getColor(2131101002));
BottomNavigationView bottomNavigationView3 = this.i0.a.b;
bottomNavigationView3.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView3.getContext(), 2131231603));
BottomNavigationView bottomNavigationView4 = this.i0.a.b;
bottomNavigationView4.setItemTextColor(ContextCompat.getColorStateList(bottomNavigationView4.getContext(), 2131231603));
this.i0.a.p.setImageDrawable(ContextCompat.getDrawable(this, 2131232520));
this.i0.a.o.setImageDrawable(ContextCompat.getDrawable(this, 2131232352));
}
if (this.i0.a.b.getMenu() != null && this.i0.a.b.getMenu().findItem(801) != null) {
if (AppController.j().E()) {
this.i0.a.b.getMenu().findItem(801).setIcon(2131233893);
} else {
this.i0.a.b.getMenu().findItem(801).setIcon(2131233892);
}
}
if (this.i0.a.b.getMenu() != null && this.i0.a.b.getMenu().findItem(1004) != null) {
if (AppController.j().E()) {
this.i0.a.b.getMenu().findItem(1004).setIcon(2131234285);
} else {
this.i0.a.b.getMenu().findItem(1004).setIcon(2131234285);
}
}
if (this.i0.a.b.getMenu() != null && this.i0.a.b.getMenu().findItem(1002) != null) {
if (AppController.j().E()) {
this.i0.a.b.getMenu().findItem(1002).setIcon(2131232310);
} else {
this.i0.a.b.getMenu().findItem(1002).setIcon(2131232309);
}
}
A0(AppController.j().E());
}
public void K0() {
Config g = AppController.j().g();
String freeSubEligibilityCheckURL = (g == null || g.getSubscription() == null) ? "" : g.getSubscription().getFreeSubEligibilityCheckURL();
JSONObject jSONObject = new JSONObject();
JSONObject jSONObject2 = new JSONObject();
try {
jSONObject2.put("platform", "Android");
jSONObject2.put("device_id", f6.d.b(this));
jSONObject2.put("device_type", "Android");
jSONObject.put("device_details", jSONObject2);
} catch (JSONException unused) {
}
String doGenerateToken = TokenGenerater.doGenerateToken(jSONObject.toString());
HashMap hashMap = new HashMap();
hashMap.put("ProductId", getResources().getString(2131952728));
hashMap.put("ht-subscription-signature", doGenerateToken);
new w1(this, new h0(this)).a(1, "FetchDeviceEligibility", freeSubEligibilityCheckURL, jSONObject, hashMap, false, false);
}
public void K2() {
J3();
x1();
FragmentManager supportFragmentManager = getSupportFragmentManager();
this.i0.a.b.setVisibility(8);
if (supportFragmentManager.findFragmentByTag("EXPLORE") == null || !supportFragmentManager.getBackStackEntryAt(supportFragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("EXPLORE")) {
A1();
LefMenuRevampFragment lefMenuRevampFragment = new LefMenuRevampFragment();
Bundle bundle = new Bundle();
bundle.putParcelable("top_section_section", (Parcelable) this.y.getBottomNav().get(2));
lefMenuRevampFragment.setArguments(bundle);
supportFragmentManager.beginTransaction().add(2131429286, lefMenuRevampFragment, "EXPLORE").addToBackStack("EXPLORE").commitAllowingStateLoss();
AppController.L = "Explore";
}
}
public void K3() {
Fragment findFragmentById = getSupportFragmentManager().findFragmentById(2131429286);
if (findFragmentById == null || !(findFragmentById instanceof VideoListFragment)) {
return;
}
getWindow().setStatusBarColor(-16777216);
getWindow().getDecorView().setSystemUiVisibility(0);
if (this.f == null) {
L1();
}
this.f.setBackgroundColor(getResources().getColor(2131100008));
this.i0.a.K.setBackgroundColor(getResources().getColor(2131100915));
this.i0.a.L.setBackgroundColor(getResources().getColor(2131100915));
this.i0.a.b.setBackgroundColor(getResources().getColor(2131101012));
BottomNavigationView bottomNavigationView = this.i0.a.b;
bottomNavigationView.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView.getContext(), 2131231606));
BottomNavigationView bottomNavigationView2 = this.i0.a.b;
bottomNavigationView2.setItemTextColor(ContextCompat.getColorStateList(bottomNavigationView2.getContext(), 2131231606));
findViewById(2131429286).setBackgroundColor(getResources().getColor(2131100945));
this.i0.a.p.setImageDrawable(ContextCompat.getDrawable(this, 2131232521));
this.i0.a.o.setImageDrawable(ContextCompat.getDrawable(this, 2131232351));
this.i0.j.setBackground(getResources().getDrawable(2131231714));
this.i0.q.setTextColor(getResources().getColor(2131101012));
this.i0.a.y.setBackgroundColor(getResources().getColor(2131101012));
this.i0.f.setImageResource(2131232352);
this.i0.a.C.setBackground(ContextCompat.getDrawable(this, 2131231336));
this.i0.a.B.setTextColor(getResources().getColor(2131100968));
invalidateOptionsMenu();
}
public void m2() {
if (this.a == null || !f0.n2(this)) {
return;
}
TempDataHolder tempDataHolder = TempDataHolder.INSTANCE;
NewsListItem newsListItem = tempDataHolder.getNewsListItem();
int intValue = tempDataHolder.getChildPosition().intValue();
int intValue2 = tempDataHolder.getGroupPosition().intValue();
if (newsListItem != null) {
NewsListItem cloneObject = newsListItem.getCloneObject();
tempDataHolder.clearNewsListItem();
this.a.d(this, cloneObject.isFollowed(), cloneObject, intValue, intValue2);
}
}
public void N3(boolean z) {
this.r0 = z;
}
public void O1() {
WorkManager.getInstance(this).enqueue(new OneTimeWorkRequest.Builder(ConfigWorker.class).build());
}
public void O2(String str) {
o1.a("HomeActivity", "openLoginActivity: ");
WebEngageNewSSOEvents.trackSSOLinkClicked("Sign In", str);
n.M(this, n.r1, n.p(this), (Content) null, "", new String[]{"sign in"});
n.a aVar = n.a.e;
n.g0((String) null, (String) null, aVar.a(), aVar.a());
Intent intent = new Intent((Context) this, (Class<?>) LoginRegisterActivity.class);
intent.putExtra("origin", str);
intent.putExtra("referer", str);
intent.putExtra("ssoReason", "topnavbar");
intent.setFlags(603979776);
overridePendingTransition(2130772024, 2130772025);
startActivityForResult(intent, 102, ActivityOptions.makeCustomAnimation(this, 2130772024, 2130772030).toBundle());
}
public void O3(int i) {
int backStackEntryCount = getSupportFragmentManager().getBackStackEntryCount() - 1;
if (backStackEntryCount >= 0) {
StoryDetailFragment findFragmentByTag = getSupportFragmentManager().findFragmentByTag(getSupportFragmentManager().getBackStackEntryAt(backStackEntryCount).getName());
if (findFragmentByTag instanceof StoryDetailFragment) {
findFragmentByTag.fragmentBinding.a.setPadding(0, 0, 0, i);
}
}
}
public void P2(String str) {
o1.a("HomeActivity", "openLoginActivity: ");
WebEngageNewSSOEvents.trackSSOLinkClicked("Sign In", str);
n.M(this, "my_account_deeplink_gift_sub", n.p(this), (Content) null, "", new String[]{"sign in"});
n.g0((String) null, (String) null, str, str);
Intent intent = new Intent((Context) this, (Class<?>) LoginRegisterActivity.class);
intent.putExtra("origin", str);
intent.putExtra("referer", str);
intent.putExtra("ssoReason", str);
intent.setFlags(603979776);
overridePendingTransition(2130772024, 2130772025);
startActivityForResult(intent, 2009, ActivityOptions.makeCustomAnimation(this, 2130772024, 2130772030).toBundle());
}
public String Q0(Section section) {
if (section != null) {
if (!TextUtils.isEmpty(section.getDisplayHeader())) {
return section.getDisplayHeader();
}
if (!TextUtils.isEmpty(section.getTabImageId())) {
String tabImageId = section.getTabImageId();
Locale locale = Locale.ENGLISH;
if (tabImageId.toLowerCase(locale).contains("wsj")) {
return "The Wall Street Journal";
}
if (section.getTabImageId().toLowerCase(locale).contains("economist")) {
return "The Economist";
}
if (section.getTabImageId().toLowerCase(locale).contains("barron")) {
return "The Barron's";
}
}
}
return "Global";
}
public void Q2() {
Content content = new Content();
content.setMetadata(new Metadata());
content.getMetadata().setSection("mint_special");
n.A(G0, n.U0, "/mint special", "topic_page", content, "mint_special");
FragmentManager supportFragmentManager = getSupportFragmentManager();
supportFragmentManager.beginTransaction().add(2131429286, new MintPillerViewAllFragment(), "Mint_piller_view_all_TAG").addToBackStack("Mint_piller_view_all_TAG").commitAllowingStateLoss();
}
public void Q3(HomeActivityTimer.TimerListener timerListener) {
if (this.p0 == null) {
K1();
}
HomeActivityTimer homeActivityTimer = this.p0;
if (homeActivityTimer != null) {
homeActivityTimer.setTimerListener(timerListener);
}
}
public j1 R0() {
return this.m0;
}
public void R2(String str, String str2, String str3) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
MutualFundListingViewAllFragment mutualFundListingViewAllFragment = new MutualFundListingViewAllFragment();
Bundle bundle = new Bundle();
bundle.putString("CATEGORY_KEY", str);
bundle.putString("SUB_CATEGORY_KEY", str2);
bundle.putString("MUTUAL_FUND_POSITION", str3);
mutualFundListingViewAllFragment.setArguments(bundle);
supportFragmentManager.beginTransaction().add(2131429286, mutualFundListingViewAllFragment, "MUTUAL_FUND_VIEW_ALL").addToBackStack("MUTUAL_FUND_VIEW_ALL").commitAllowingStateLoss();
}
public void R3() {
this.f.setTitleTextColor(ResourcesCompat.getColor(getResources(), 2131101009, (Resources.Theme) null));
this.i0.a.H.setTextColor(ResourcesCompat.getColor(getResources(), 2131101009, (Resources.Theme) null));
this.i0.a.H.setBackgroundColor(ResourcesCompat.getColor(getResources(), 2131100008, (Resources.Theme) null));
this.f.setNavigationIcon(2131231333);
Toolbar toolbar = this.f;
if (toolbar != null) {
toolbar.setTitle("Back");
this.i0.a.o.setVisibility(8);
this.f.setNavigationOnClickListener(new y(this));
if (this.f.getTitle() != null) {
String charSequence = this.f.getTitle().toString();
for (int i = 0; i < this.f.getChildCount(); i++) {
AppCompatTextView childAt = this.f.getChildAt(i);
if ("androidx.appcompat.widget.AppCompatTextView".equals(childAt.getClass().getName())) {
AppCompatTextView appCompatTextView = childAt;
if (appCompatTextView.getText().equals(charSequence)) {
appCompatTextView.setTypeface(ResourcesCompat.getFont(this, 2131296270));
appCompatTextView.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
appCompatTextView.setCompoundDrawablePadding(0);
childAt.setOnClickListener(new z(this));
}
}
}
}
}
}
public void S0() {
if (K0 == null) {
Config g = getApplication().g();
if (g.getLshaped().getLshapeImageDataUrl() == null || g.getLshaped().getLshapeImageDataUrl().isEmpty()) {
return;
}
p0 p0Var = new p0(this, this);
this.D = p0Var;
p0Var.a(0, "HomeActivity", g.getLshaped().getLshapeImageDataUrl(), true, false);
}
}
public void S2(List<CollectionPojo> list, List<String> list2, String str) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
MutualFundListingViewAllFragment mutualFundListingViewAllFragment = new MutualFundListingViewAllFragment();
Bundle bundle = new Bundle();
bundle.putParcelableArrayList("CATEGORY_COLLECTION", (ArrayList) list);
bundle.putString("MUTUAL_FUND_POSITION", "3yr returns");
if (str != null) {
bundle.putString("SELECTED_SORT", str);
} else {
bundle.putString("SELECTED_SORT", "");
}
if (list2 != null) {
bundle.putStringArrayList("SELECTED_RATING", (ArrayList) list2);
} else {
bundle.putStringArrayList("SELECTED_RATING", new ArrayList<>());
}
mutualFundListingViewAllFragment.setArguments(bundle);
supportFragmentManager.beginTransaction().add(2131429286, mutualFundListingViewAllFragment, "MUTUAL_FUND_VIEW_ALL").addToBackStack("MUTUAL_FUND_VIEW_ALL").commitAllowingStateLoss();
}
public boolean T1() {
return V0() == 401;
}
public Section U0(String str, Config config) {
if (config == null) {
config = AppController.j().g();
}
if (config == null || config.getBottomNav() == null || config.getBottomNav().size() <= 0) {
return null;
}
for (int i = 0; i < config.getBottomNav().size(); i++) {
if (((Section) config.getBottomNav().get(i)).getId().equals(str)) {
Section section = (Section) config.getBottomNav().get(i);
Section section2 = new Section();
try {
section2 = (Section) section.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
if (section2 != null) {
if (section2.getId().equalsIgnoreCase("foryou_tab")) {
if (!TextUtils.isEmpty(config.getRevisedForYouUrl())) {
String str2 = config.getRevisedForYouUrl() + "?htfpId=" + f0.I0(this) + "&propertyId=lm§ion=all&numStories=40";
section2.setUrl(str2);
section2.setListUrl(str2);
section2.setDisplayName("MY MINT");
}
} else if (!TextUtils.isEmpty(section2.getUrl()) && section2.getUrl().contains("personalize")) {
String G1 = f0.G1(this, "userName") != null ? f0.G1(this, "userClient") : f6.d.b(this);
section2.setUrl(section2.getUrl().contains("?") ? section2.getUrl() + "htfpId=" + G1 + "&propertyId=lm&platformId=app&numStories=40" : section2.getUrl() + "?htfpId=" + G1 + "&propertyId=lm&platformId=app&numStories=40");
section2.setSubscribeUrl(section.getSubscribeUrl());
}
return section2;
}
}
}
return null;
}
public boolean U1() {
Menu menu;
int size;
BottomNavigationView bottomNavigationView = this.i0.a.b;
if (bottomNavigationView != null && (menu = bottomNavigationView.getMenu()) != null && (size = menu.size()) > 0) {
for (int i = 0; i < size; i++) {
if (menu.getItem(i).getItemId() == 1003) {
return true;
}
}
}
return false;
}
public void V1(boolean z) {
MenuItem menuItem = this.U;
if (menuItem != null) {
menuItem.setVisible(z);
}
}
public void V2() {
NotificationCenterFragment notificationCenterFragment = new NotificationCenterFragment();
f0.i3(this, "notofication_click", new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss+SSSS").format(Calendar.getInstance().getTime()));
getSupportFragmentManager().beginTransaction().add(2131429286, notificationCenterFragment, "NotificationCenter").addToBackStack("NotificationCenter").commitAllowingStateLoss();
}
public void V3() {
MenuItem menuItem = this.s;
if (menuItem != null) {
menuItem.setVisible(true);
}
}
void W2() {
new Handler().postDelayed(new d0(this), 1000L);
}
public void W3() {
if (!f0.O1() || f0.P1()) {
if (CheckSubscriptionFromLocal.isAdFreeSubscribedUser(this) && !f0.P1()) {
this.i0.a.y.setVisibility(8);
return;
}
String bottomStickyAdIdAndroid = f0.r0().getMarkets().getBottomStickyAdIdAndroid();
if (TextUtils.isEmpty(bottomStickyAdIdAndroid)) {
return;
}
this.i0.a.y.removeAllViews();
this.i0.a.y.setVisibility(0);
AdManagerAdRequest b = com.htmedia.mint.utils.m.b(this, (Content) null, "", "");
AdManagerAdView adManagerAdView = this.v0;
if (adManagerAdView == null) {
AdManagerAdView d = com.htmedia.mint.utils.m.d(this, adManagerAdView, new AdSize[]{AdSize.BANNER}, bottomStickyAdIdAndroid, b);
this.v0 = d;
d.setAdListener(new x(this));
this.i0.a.y.setVisibility(0);
} else {
this.i0.a.y.setVisibility(0);
}
this.i0.a.y.addView(this.v0);
}
}
public boolean X0(int i) {
BottomNavigationView bottomNavigationView = this.i0.a.b;
if (((bottomNavigationView == null || bottomNavigationView.getMenu() == null) ? null : this.i0.a.b.getMenu().findItem(i)) == null) {
return false;
}
this.i0.a.b.setSelectedItemId(i);
return true;
}
public void X3() {
H0();
Config config = this.y;
if (config == null || !config.getIsShowCoachMark() || f0.g2(this)) {
return;
}
if (TextUtils.isEmpty(O0()) || !O0().equalsIgnoreCase("HOME")) {
c.a aVar = this.h0;
if (aVar != null) {
if (aVar == c.a.a || aVar == c.a.b) {
if (this.n0 == q.m.a.ordinal() || this.n0 == q.m.g.ordinal()) {
m3();
f fVar = this.P;
if (fVar != null) {
fVar.C();
AppController.M = true;
return;
}
return;
}
return;
}
return;
}
return;
}
NighModeAlertDialogFragment nighModeAlertDialogFragment = this.R;
if (nighModeAlertDialogFragment == null || nighModeAlertDialogFragment.getDialog() == null || !this.R.getDialog().isShowing()) {
v7.g gVar = this.S;
if (gVar == null || !gVar.isShowing()) {
c.a aVar2 = this.h0;
if (aVar2 == null || !((aVar2 == c.a.a || aVar2 == c.a.b) && (this.n0 == q.m.a.ordinal() || this.n0 == q.m.g.ordinal()))) {
n3();
} else {
m3();
}
f fVar2 = this.P;
if (fVar2 != null) {
fVar2.C();
AppController.M = true;
}
}
}
}
public void Z3() {
Bundle extras = getIntent() != null ? getIntent().getExtras() : null;
if ((extras != null && extras.containsKey("IS_BUDGET") && extras.getBoolean("IS_BUDGET")) || f0.d || h5.c.d) {
return;
}
if (l.a(this, "is_not_first_launch")) {
Y3();
}
l.m(this, "is_not_first_launch", Boolean.TRUE);
this.M.showOfferDialog();
}
public void a1(FragmentManager fragmentManager) {
MarketDashboardNewFragment marketDashboardNewFragment = new MarketDashboardNewFragment();
Bundle bundle = new Bundle();
if (getIntent().getExtras() != null && (getIntent().getExtras().getBoolean("market_mutual_fund_tab", false) || getIntent().getExtras().getBoolean("stocks_to_buy", false) || getIntent().getExtras().getBoolean("followed_stocks", false))) {
bundle = getIntent().getExtras();
}
Section U0 = U0("market_page", this.y);
bundle.putParcelable("top_section_section", U0);
marketDashboardNewFragment.setArguments(bundle);
fragmentManager.beginTransaction().add(2131429286, marketDashboardNewFragment, "MARKETS").addToBackStack("MARKETS").commitAllowingStateLoss();
AppController.L = AppController.K;
AppController.K = U0.getDisplayName();
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{U0.getDisplayName()});
if (this.i0.a.b.getMenu().findItem(401) != null) {
this.i0.a.b.getMenu().findItem(401).setChecked(true);
invalidateOptionsMenu();
}
}
void a3(FragmentManager fragmentManager) {
fragmentManager.beginTransaction().add(2131429286, new PreviewFragment(), "PREVIEW_FRAGMENT_TAG").addToBackStack("PREVIEW_FRAGMENT_TAG").commitAllowingStateLoss();
}
void a4(int i, e eVar) {
if (this.c0) {
return;
}
this.c0 = true;
if (f0.m2(this, AppController.j().l())) {
n4.b.w("Autopay Popup Clicked", eVar);
this.Y = new RazorPayCheckout(true, this, q.v.d, i);
}
}
public void b1(FragmentManager fragmentManager, boolean z, String str) {
MarketDashboardNewFragment marketDashboardNewFragment = new MarketDashboardNewFragment();
Bundle bundle = new Bundle();
if (getIntent().getExtras() != null && getIntent().getExtras().getBoolean("market_mutual_fund_tab", false)) {
bundle = getIntent().getExtras();
}
Section U0 = U0("market_page", this.y);
bundle.putBoolean("GO_TO_MARKET_VISIBLE_KEY", z);
if (!TextUtils.isEmpty(str)) {
bundle.putString("l2_section_section", str);
}
bundle.putParcelable("top_section_section", U0);
marketDashboardNewFragment.setArguments(bundle);
fragmentManager.beginTransaction().add(2131429286, marketDashboardNewFragment, "MARKETS").addToBackStack("MARKETS").commitAllowingStateLoss();
AppController.L = AppController.K;
AppController.K = U0.getDisplayName();
n.M(this, n.p1, "Home", (Content) null, "", new String[]{U0.getDisplayName()});
if (this.i0.a.b.getMenu().findItem(401) != null) {
this.i0.a.b.getMenu().findItem(401).setChecked(true);
invalidateOptionsMenu();
}
}
public void b3(Section section) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
NewsLatestAndTrendingFragment homeFragment = new HomeFragment();
Bundle bundle = new Bundle();
if (section.getDisplayName() == null || !section.getDisplayName().equalsIgnoreCase("NEWS")) {
bundle.putParcelable("top_section_section", section);
} else {
homeFragment = new NewsLatestAndTrendingFragment();
}
bundle.putBoolean("is_from_left_nav", true);
bundle.putBoolean("is_masthead_show", true);
try {
bundle.putString(n.X, "Explore");
} catch (Exception e) {
e.printStackTrace();
}
homeFragment.setArguments(bundle);
if (!supportFragmentManager.isStateSaved()) {
supportFragmentManager.beginTransaction().add(2131429286, homeFragment, "Tag_Section").addToBackStack("Tag_Section").commit();
Log.i("HomeActivity", "FragmentTransaction() Executed");
}
f4(false, section.getDisplayName().toUpperCase());
}
public void b4(Content content, OfferPremium offerPremium, boolean z) {
if (!CheckSubscriptionFromLocal.isSubscribedUser(this) && offerPremium != null && offerPremium.getDiscountTemplate() != null && offerPremium.getDiscountTemplate().getType().equals(offerPremium.getNon_subscribed_user_template())) {
C3(offerPremium.getDiscountTemplate(), content, z);
}
this.i0.a.q.addOnOffsetChangedListener(new w(this));
this.i0.a.t.b.getTop();
}
public void c1() {
if (TextUtils.isEmpty(f0.G1(this, "userToken"))) {
O2("Home Login");
return;
}
n.O(this, n.u1, n.M2, n.k(G0), "", (Content) null, new String[]{""});
WebEngageAnalytices.trackClickEvents("My Account", (String) null, "My Account Viewed", (Content) null, "Top Header", "", "");
n.M(this, n.r1, n.p(this), (Content) null, "", new String[]{"My Account"});
k1.x(k1.l(this), "/section.url");
startActivity(SubscriptionTrigger.openProfileActivity(this));
}
public void c4(boolean z) {
if (!z) {
this.i0.a.x.setVisibility(8);
this.i0.a.h.setVisibility(8);
this.i0.a.z.setVisibility(8);
return;
}
MintSubscriptionDetail l = AppController.j().l();
if ((l == null || l.isSubscriptionActive()) && f0.O1()) {
this.i0.a.x.setVisibility(8);
this.i0.a.h.setVisibility(8);
this.i0.a.z.setVisibility(8);
} else {
this.i0.a.x.setVisibility(0);
this.i0.a.h.setVisibility(0);
this.i0.a.z.setVisibility(0);
}
}
public void d(JSONObject jSONObject) {
if (jSONObject != null) {
try {
f0.T2(com.htmedia.mint.utils.r.a(jSONObject.getJSONArray("campaigns")), "cdp_campaign", this);
} catch (Exception e) {
e.printStackTrace();
}
}
}
public void d3() {
n.M(this, n.r1, "watchlist_detail_page", (Content) null, "watchlist_detail_page", new String[]{"watchlist"});
FragmentManager supportFragmentManager = getSupportFragmentManager();
MyWatchlistListingFragment myWatchlistListingFragment = new MyWatchlistListingFragment();
if (supportFragmentManager.isStateSaved()) {
return;
}
supportFragmentManager.beginTransaction().add(2131429286, myWatchlistListingFragment, "Tag_Watch_List_Listing").addToBackStack("Tag_Watch_List_Listing").commit();
}
public void d4(boolean z) {
if (z) {
C1();
this.i0.a.w.setVisibility(8);
} else {
q4();
this.i0.a.w.setVisibility(0);
}
}
public void e(LShapedAdData lShapedAdData) {
if (lShapedAdData == null || lShapedAdData.getData() == null || lShapedAdData.getData().isEmpty()) {
return;
}
K0 = lShapedAdData.getData();
}
public void e1(Bundle bundle) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
NewsInNumberDetailsFragment newsInNumberDetailsFragment = new NewsInNumberDetailsFragment();
if (bundle != null) {
newsInNumberDetailsFragment.setArguments(bundle);
}
supportFragmentManager.beginTransaction().add(2131429286, newsInNumberDetailsFragment, "NEWS_NUMBER_DETAIL_TAG").addToBackStack("NEWS_NUMBER_DETAIL_TAG").commitAllowingStateLoss();
}
public void e4(boolean z, String str, Section section) {
if (this.y == null) {
this.y = AppController.j().g();
}
Config config = this.y;
boolean z2 = (config == null || config.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || !this.y.getAdsAndroidNew().getBottomStickyAd().isHomePageSponsoredAds()) ? false : true;
this.i0.a.x.setVisibility(8);
this.i0.a.h.setVisibility(8);
this.i0.a.z.setVisibility(8);
if (!z || !z2) {
y3(str, section);
} else {
if (com.htmedia.mint.utils.m.f()) {
return;
}
this.i0.a.h.setVisibility(0);
this.i0.a.x.setVisibility(0);
this.i0.a.h.setOnClickListener(new j0(this));
z3(str);
}
}
public void f1(FragmentManager fragmentManager) {
Parcelable U0 = U0("video_tab", this.y);
VideoListFragment newInstance = VideoListFragment.newInstance(true);
Bundle bundle = new Bundle();
bundle.putParcelable("top_section_section", U0);
bundle.putBoolean("is_from_bottom_nav", true);
newInstance.setArguments(bundle);
fragmentManager.beginTransaction().add(2131429286, newInstance, "VIDEOS").addToBackStack("VIDEOS").commitAllowingStateLoss();
AppController.L = AppController.K;
AppController.K = U0.getDisplayName();
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{U0.getDisplayName()});
if (this.i0.a.b.getMenu().findItem(401) != null) {
this.i0.a.b.getMenu().findItem(401).setChecked(true);
}
invalidateOptionsMenu();
}
public void f4(boolean z, String str) {
String str2;
String[] split;
if (TextUtils.isEmpty(str) || !str.contains("#") || (split = str.split("#")) == null || split.length != 2) {
str2 = "";
} else {
str = split[0];
str2 = split[split.length - 1];
}
this.e0 = str2;
this.f0 = str;
f0.c0(this.i0.a.d);
z1(false);
x1();
invalidateOptionsMenu();
i4(str);
w1();
if (z) {
this.i0.a.g.setVisibility(0);
this.i0.a.p.setVisibility(0);
this.i0.a.o.setVisibility(8);
this.i0.a.I.setVisibility(8);
this.i0.a.J.setVisibility(8);
this.i0.a.J.setText("");
A1();
if (AppController.j().E()) {
if (AppController.j().l() == null || !AppController.j().l().isSubscriptionActive()) {
Config g = AppController.j().g();
this.y = g;
if (g == null || g.getDynamicLogoChange() == null || !this.y.getDynamicLogoChange().isTopHeaderLogoEnable()) {
this.i0.a.g.setImageDrawable(ContextCompat.getDrawable(this, 2131233472));
} else {
G3(this.y, false);
}
} else {
Config g2 = AppController.j().g();
this.y = g2;
if (g2 == null || g2.getDynamicLogoChange() == null || !this.y.getDynamicLogoChange().isTopHeaderLogoEnable()) {
this.i0.a.g.setImageDrawable(ContextCompat.getDrawable(this, 2131232639));
} else {
G3(this.y, true);
}
}
this.i0.a.p.setImageDrawable(ContextCompat.getDrawable(this, 2131232521));
this.i0.a.o.setImageDrawable(ContextCompat.getDrawable(this, 2131232351));
} else {
if (AppController.j().l() == null || !AppController.j().l().isSubscriptionActive()) {
Config g3 = AppController.j().g();
this.y = g3;
if (g3 == null || g3.getDynamicLogoChange() == null || !this.y.getDynamicLogoChange().isTopHeaderLogoEnable()) {
this.i0.a.g.setImageDrawable(ContextCompat.getDrawable(this, 2131233472));
} else {
G3(this.y, false);
}
} else {
Config g4 = AppController.j().g();
this.y = g4;
if (g4 == null || g4.getDynamicLogoChange() == null || !this.y.getDynamicLogoChange().isTopHeaderLogoEnable()) {
this.i0.a.g.setImageDrawable(ContextCompat.getDrawable(this, 2131232638));
} else {
G3(this.y, true);
}
}
this.i0.a.p.setImageDrawable(ContextCompat.getDrawable(this, 2131232520));
this.i0.a.o.setImageDrawable(ContextCompat.getDrawable(this, 2131232352));
}
this.i0.a.H.setVisibility(8);
Toolbar toolbar = this.f;
if (toolbar != null) {
toolbar.setTitle("");
this.f.setNavigationIcon(2131234311);
this.f.setNavigationOnClickListener(new m(this));
}
this.i0.a.G.setVisibility(8);
BottomNavigationView bottomNavigationView = this.i0.a.b;
if (bottomNavigationView != null && bottomNavigationView.getMenu().findItem(101) != null) {
this.i0.a.b.getMenu().findItem(101).setChecked(true);
}
if (getString(2131952291).equalsIgnoreCase(str)) {
F2(getString(2131952291), 201);
} else if ("Mint Shorts".equalsIgnoreCase(str)) {
this.i0.a.b.setVisibility(0);
F2("Mint Shorts", 1001);
}
} else if (getString(2131952183).equalsIgnoreCase(str)) {
MenuItem menuItem = this.U;
if (menuItem != null) {
menuItem.setVisible(false);
}
MenuItem menuItem2 = this.T;
if (menuItem2 != null) {
menuItem2.setVisible(t4());
}
k4 k4Var = this.i0.a;
if (k4Var.p == null || k4Var.b.getMenu().findItem(401) == null) {
this.i0.a.p.setVisibility(8);
x3();
} else {
this.i0.a.p.setVisibility(0);
}
k4 k4Var2 = this.i0.a;
if (k4Var2.J == null || k4Var2.b.getMenu().findItem(401) == null) {
this.i0.a.J.setVisibility(8);
this.i0.a.H.setVisibility(0);
this.i0.a.H.setText(getString(2131952183));
this.i0.a.L.setVisibility(0);
} else {
this.i0.a.J.setVisibility(0);
this.i0.a.J.setText(getString(2131952183));
}
ImageView imageView = this.i0.a.g;
if (imageView != null) {
imageView.setVisibility(8);
}
MenuItem menuItem3 = this.j;
if (menuItem3 != null) {
menuItem3.setVisible(false);
}
TextView textView = this.E;
if (textView != null) {
textView.setVisibility(8);
}
MenuItem menuItem4 = this.g;
if (menuItem4 != null) {
menuItem4.setVisible(false);
}
MenuItem menuItem5 = this.h;
if (menuItem5 != null) {
menuItem5.setVisible(false);
}
TextView textView2 = this.i0.a.H;
if (textView2 != null) {
textView2.setVisibility(8);
}
invalidateOptionsMenu();
BottomNavigationView bottomNavigationView2 = this.i0.a.b;
if (bottomNavigationView2 != null && bottomNavigationView2.getMenu().findItem(401) != null) {
this.i0.a.b.getMenu().findItem(401).setChecked(true);
}
if (AppController.j().E()) {
TextView textView3 = this.i0.a.J;
if (textView3 != null) {
textView3.setTextColor(getResources().getColor(2131100951));
}
} else {
TextView textView4 = this.i0.a.J;
if (textView4 != null) {
textView4.setTextColor(getResources().getColor(2131101008));
}
}
MenuItem menuItem6 = this.s;
if (menuItem6 != null) {
menuItem6.setVisible(false);
}
MenuItem menuItem7 = this.r;
if (menuItem7 != null) {
menuItem7.setVisible(false);
}
MenuItem menuItem8 = this.t;
if (menuItem8 != null) {
menuItem8.setVisible(false);
}
k4 k4Var3 = this.i0.a;
if (k4Var3.I != null && k4Var3.b.getMenu().findItem(401) != null) {
this.i0.a.I.setVisibility(8);
}
W3();
} else {
A1();
if (this.j0) {
this.i0.a.I.setVisibility(0);
this.i0.a.H.setVisibility(8);
this.i0.a.I.setText(str.toUpperCase());
} else if (str.equalsIgnoreCase("watchlist") || str.equalsIgnoreCase("edit watchlist")) {
this.i0.a.I.setVisibility(0);
this.i0.a.I.setText(str.toUpperCase());
} else {
this.i0.a.I.setVisibility(8);
if (TextUtils.isEmpty(str)) {
this.i0.a.H.setVisibility(8);
} else {
this.i0.a.H.setVisibility(0);
this.i0.a.H.setText(str.toUpperCase());
}
this.i0.a.G.setVisibility(8);
}
this.i0.a.g.setVisibility(8);
this.i0.a.p.setVisibility(8);
MenuItem menuItem9 = this.U;
if (menuItem9 != null) {
menuItem9.setVisible(true);
}
MenuItem menuItem10 = this.T;
if (menuItem10 != null) {
menuItem10.setVisible(t4());
}
MenuItem menuItem11 = this.s;
if (menuItem11 != null) {
menuItem11.setVisible(false);
}
MenuItem menuItem12 = this.r;
if (menuItem12 != null) {
menuItem12.setVisible(false);
}
MenuItem menuItem13 = this.t;
if (menuItem13 != null) {
menuItem13.setVisible(false);
}
x3();
if (getString(2131952092).equalsIgnoreCase(str)) {
if (AppController.j().E()) {
this.i0.a.H.setBackgroundColor(ResourcesCompat.getColor(getResources(), 2131100273, (Resources.Theme) null));
} else {
this.i0.a.H.setBackgroundColor(ResourcesCompat.getColor(getResources(), 2131100272, (Resources.Theme) null));
}
}
}
this.i0.a.p.setOnClickListener(new n(this));
if (str.equalsIgnoreCase("PODCAST") || str.equalsIgnoreCase("PODCAST EPISODES")) {
z1(true);
}
this.i0.a.j.setVisibility(8);
this.i0.a.o.setOnClickListener(new o(this));
if (str.equalsIgnoreCase("watchlist") || str.equalsIgnoreCase("edit watchlist")) {
this.i0.a.o.setVisibility(8);
} else if (str.equalsIgnoreCase("GOLD PRICES") || str.equalsIgnoreCase("SILVER PRICES")) {
this.i0.a.H.setVisibility(8);
}
B3();
}
public void fetchPremiumCounterMeter(PremiumStoryMeter premiumStoryMeter) {
if (this.X == null) {
Toast.makeText((Context) this, (CharSequence) getResources().getString(2131952559), 0).show();
return;
}
if (premiumStoryMeter != null) {
AppController.j().W(premiumStoryMeter);
}
T3();
}
public void g1(FragmentManager fragmentManager) {
boolean z;
Section U0;
x1();
Config config = this.y;
if (config == null || config.getBottomItemsUpgradeAndroid() == null) {
z = false;
} else {
z = false;
for (int i = 0; i < this.y.getBottomItemsUpgradeAndroid().size(); i++) {
int i2 = 0;
while (true) {
if (i2 >= ((ArrayList) this.y.getBottomItemsUpgradeAndroid().get(i)).size()) {
break;
}
if ("global_tab".equalsIgnoreCase((String) ((ArrayList) this.y.getBottomItemsUpgradeAndroid().get(i)).get(i2))) {
z = true;
break;
}
i2++;
}
if (z) {
break;
}
}
}
if (z) {
U0 = U0("global_tab", this.y);
if (U0 != null && !TextUtils.isEmpty(U0.getTabImageId()) && U0.getTabImageId().toLowerCase(Locale.ENGLISH).contains("economist")) {
if (AppController.j().E()) {
BottomNavigationView bottomNavigationView = this.i0.a.b;
bottomNavigationView.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView.getContext(), 2131231605));
} else {
BottomNavigationView bottomNavigationView2 = this.i0.a.b;
bottomNavigationView2.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView2.getContext(), 2131231604));
}
}
} else {
new Section();
U0 = U0("global_tab", this.y);
U0.setUrl(AppController.j().g().getServerUrl() + this.y.getEconomistUrl());
U0.setDisplayName("The Economist");
U0.setTabImageId("economist");
}
HomeFragment homeFragment = new HomeFragment();
Bundle bundle = new Bundle();
bundle.putParcelable("top_section_section", U0);
homeFragment.setArguments(bundle);
fragmentManager.beginTransaction().add(2131429286, homeFragment, "GLOBAL").addToBackStack("GLOBAL").commitAllowingStateLoss();
AppController.L = AppController.K;
AppController.K = Q0(U0);
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{U0.getDisplayName()});
Config config2 = this.y;
if (config2 == null || config2.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
}
void g4(int i, e eVar) {
try {
if (this.b0) {
return;
}
this.b0 = true;
f0 f0Var = new f0(this, eVar);
AutoRenewalBottomSheet newInstance = AutoRenewalBottomSheet.newInstance(i, f0Var);
newInstance.setPopupPayButtonClick(f0Var);
n4.b.w("Autopay Popup Viewed", eVar);
newInstance.show(getSupportFragmentManager(), "ModalBottomSheet");
newInstance.setCancelable(false);
} catch (Exception unused) {
}
}
public void getBottomLayoutBehavior(View view) {
this.i0.a.b.getLayoutParams().getBehavior().m(view);
}
public void getConfig(Config config) {
getApplication().L(config);
long seconds = TimeUnit.MILLISECONDS.toSeconds(Calendar.getInstance(TimeZone.getTimeZone("GMT")).getTimeInMillis());
AppController.Z = seconds;
f0.b4(this, seconds, "lastUpdatedTime");
f0.y("", this.J, config.getContextualTarget_url());
if (!AppController.a0) {
u4(config);
return;
}
AppController.a0 = false;
Intent intent = new Intent((Context) this, (Class<?>) HomeActivity.class);
intent.setFlags(65536);
intent.setFlags(67108864);
overridePendingTransition(0, 0);
startActivity(intent);
AppController.b0 = true;
}
public void getData(ContextualTargetPojo contextualTargetPojo) {
ContextualTargetPojo.Targeting targeting;
if (contextualTargetPojo == null || (targeting = contextualTargetPojo.getTargeting()) == null || targeting.getVndPrxSegments().size() <= 0) {
return;
}
List<String> vndPrxSegments = targeting.getVndPrxSegments();
this.I = vndPrxSegments;
f0.T2(vndPrxSegments, "contextual_ids", this);
}
public void getNotificationResponse(NotificationPojo notificationPojo) {
}
public void getResponse(JSONObject jSONObject, String str) {
o1.a("RECO EVENT LOG: ", "SUCCESS");
}
public void getUserSubscriptionDetail(MintSubscriptionDetail mintSubscriptionDetail) {
System.out.println("hi is -----11");
v0();
}
public void h4() {
FragmentManager supportFragmentManager = getSupportFragmentManager();
HomeFragment homeFragment = new HomeFragment();
int size = this.y.getBottomNav().size();
Bundle bundle = new Bundle();
Section section = (Section) this.y.getBottomNav().get(f0.E0(size));
section.setUrl("/market/market-stats");
section.setId("");
bundle.putBoolean("is_from_left_nav", true);
f4(false, "MARKET");
this.i0.a.q.setExpanded(true, true);
bundle.putString("topicName", "Market Dashboard");
bundle.putParcelable("top_section_section", section);
homeFragment.setArguments(bundle);
supportFragmentManager.beginTransaction().replace(2131429286, homeFragment, "Market Dashboard").addToBackStack("Market Dashboard").commit();
f4(false, "Market Dashboard");
this.i0.a.q.setExpanded(true, true);
}
public void j1(FragmentManager fragmentManager) {
x1();
if (fragmentManager.findFragmentByTag("Mint Shorts") == null || !fragmentManager.getBackStackEntryAt(fragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("Mint Shorts")) {
MintShortsFragment newInstance = MintShortsFragment.Companion.newInstance();
Parcelable U0 = U0("mint_shorts", this.y);
Bundle bundle = new Bundle();
bundle.putParcelable("top_section_section", U0);
newInstance.setArguments(bundle);
fragmentManager.beginTransaction().add(2131429286, newInstance, "Mint Shorts").addToBackStack("Mint Shorts").commitAllowingStateLoss();
AppController.L = AppController.K;
n.M(this, n.p1, n.M0, (Content) null, "", new String[]{"Mint Shorts"});
if (this.i0.a.b.getMenu().findItem(1001) != null) {
this.i0.a.b.getMenu().findItem(1001).setChecked(true);
}
invalidateOptionsMenu();
}
f4(true, "Mint Shorts");
Config config = this.y;
if (config == null || config.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
}
public void j3() {
int i = getResources().getDisplayMetrics().widthPixels;
f c = new f.a(this).f(this.i0.a.p).d(-872415232).e(1).a(AppController.j().E() ? 2131624147 : 2131624146, 48, TypedValue.applyDimension(0, -((i / 2) - ((i / 5) + (i / 9))), getResources().getDisplayMetrics()), TypedValue.applyDimension(1, 170.0f, getResources().getDisplayMetrics()), TypedValue.applyDimension(1, 0.0f, getResources().getDisplayMetrics()), -40.0f).c();
this.O = c;
c.B(2131427735, new u0(this));
}
public void j4(String str, boolean z) {
k4(str, z, false);
}
public void k(h.e eVar) {
L0.t(eVar);
}
public void k1() {
HashMap hashMap = new HashMap();
hashMap.put("testkey1", "testvalue1");
hashMap.put("testkey2", "testvalue2");
k1.e(new GenericEventRequest("testEventPOC", hashMap, "event", this), this);
}
public void k3() {
Fragment findFragmentById;
int i = getResources().getDisplayMetrics().widthPixels;
float f = (i / 2) - ((i / 5) + (i / 9));
int i2 = AppController.j().E() ? 2131624134 : 2131624133;
View view = null;
if (getSupportFragmentManager().findFragmentById(2131429286) instanceof HomeFragment) {
Fragment findFragmentById2 = getSupportFragmentManager().findFragmentById(2131429286);
if (findFragmentById2 != null) {
List fragments = findFragmentById2.getParentFragmentManager().getFragments();
int i3 = 0;
while (true) {
if (i3 >= fragments.size()) {
break;
}
if (fragments.get(i3) instanceof HomeTabViewFragment) {
view = (TabLayout) ((Fragment) fragments.get(i3)).getView().findViewById(2131430773);
break;
}
i3++;
}
}
} else if ((getSupportFragmentManager().findFragmentById(2131429286) instanceof HomeTabViewFragment) && (findFragmentById = getSupportFragmentManager().findFragmentById(2131429286)) != null) {
view = (TabLayout) findFragmentById.getView().findViewById(2131430773);
}
if (view != null) {
f c = new f.a(this).f(view).d(-872415232).e(1).a(i2, 48, TypedValue.applyDimension(0, -f, getResources().getDisplayMetrics()), TypedValue.applyDimension(1, 170.0f, getResources().getDisplayMetrics()), TypedValue.applyDimension(1, 0.0f, getResources().getDisplayMetrics()), -40.0f).c();
this.N = c;
c.B(2131427741, new v0(this));
this.N.B(2131431133, new w0(this));
}
}
public void k4(String str, boolean z, boolean z2) {
x1();
i4(str);
w1();
if ("EXPLORE".equalsIgnoreCase(str)) {
this.M.hideCrossButton();
} else {
this.M.showCrossButton();
}
if (z) {
if (this.f == null) {
this.f = findViewById(2131430942);
}
invalidateOptionsMenu();
if (str.equalsIgnoreCase("EXPLORE")) {
this.f.setNavigationIcon((Drawable) null);
this.f.setTitle("");
this.i0.a.G.setVisibility(8);
} else {
this.f.setTitle("");
this.i0.a.G.setVisibility(8);
}
this.i0.a.g.setVisibility(8);
this.i0.a.p.setVisibility(8);
this.i0.a.I.setVisibility(0);
this.i0.a.H.setVisibility(8);
this.i0.a.I.setText(str);
if (AppController.j().E()) {
this.i0.a.I.setTextColor(getResources().getColor(2131100951));
} else {
this.i0.a.I.setTextColor(getResources().getColor(2131101008));
}
} else {
if (this.f == null) {
this.f = findViewById(2131430942);
}
invalidateOptionsMenu();
if (str.equalsIgnoreCase("EXPLORE")) {
this.i0.a.g.setVisibility(8);
this.i0.a.p.setVisibility(8);
this.f.setNavigationIcon((Drawable) null);
this.f.setTitle("");
this.i0.a.G.setVisibility(8);
this.j.setVisible(false);
this.i.setVisible(true);
this.q.setVisible(true);
if ("Market Dashboard".equalsIgnoreCase(str) && this.i0.a.b.getMenu().findItem(401) != null) {
this.i0.a.b.getMenu().findItem(401).setChecked(true);
}
} else {
this.i0.a.g.setVisibility(0);
this.i0.a.p.setVisibility(0);
this.i0.a.o.setVisibility(8);
MenuItem menuItem = this.j;
if (menuItem != null) {
menuItem.setVisible(false);
}
if (AppController.j().E()) {
if (AppController.j().l() == null || !AppController.j().l().isSubscriptionActive()) {
Config g = AppController.j().g();
this.y = g;
if (g == null || g.getDynamicLogoChange() == null || !this.y.getDynamicLogoChange().isTopHeaderLogoEnable()) {
this.i0.a.g.setImageDrawable(getResources().getDrawable(2131233472));
} else {
G3(this.y, false);
}
} else {
Config g2 = AppController.j().g();
this.y = g2;
if (g2 == null || g2.getDynamicLogoChange() == null || !this.y.getDynamicLogoChange().isTopHeaderLogoEnable()) {
this.i0.a.g.setImageDrawable(getResources().getDrawable(2131232639));
} else {
G3(this.y, true);
}
}
} else if (AppController.j().l() == null || !AppController.j().l().isSubscriptionActive()) {
Config g3 = AppController.j().g();
this.y = g3;
if (g3 == null || g3.getDynamicLogoChange() == null || !this.y.getDynamicLogoChange().isTopHeaderLogoEnable()) {
this.i0.a.g.setImageDrawable(getResources().getDrawable(2131233472));
} else {
G3(this.y, false);
}
} else {
Config g4 = AppController.j().g();
this.y = g4;
if (g4 == null || g4.getDynamicLogoChange() == null || !this.y.getDynamicLogoChange().isTopHeaderLogoEnable()) {
this.i0.a.g.setImageDrawable(getResources().getDrawable(2131232638));
} else {
G3(this.y, true);
}
}
this.f.setTitle("");
this.f.setNavigationIcon(2131234311);
this.f.setNavigationOnClickListener(new r(this));
this.i0.a.G.setVisibility(8);
if (AppController.j().E()) {
this.i0.a.G.setTextColor(ContextCompat.getColor(this, 2131100951));
this.i0.a.H.setBackgroundColor(ResourcesCompat.getColor(getResources(), 2131100008, (Resources.Theme) null));
} else {
this.i0.a.G.setTextColor(ContextCompat.getColor(this, 2131100859));
this.i0.a.H.setBackgroundColor(ResourcesCompat.getColor(getResources(), 2131101002, (Resources.Theme) null));
}
if (this.i0.a.G.getText() != null && this.i0.a.G.getText().toString().equals("e-paper")) {
this.i0.a.G.getText().toString();
this.i0.a.G.setTypeface(ResourcesCompat.getFont(this, 2131296266));
this.i0.a.G.setCompoundDrawablesWithIntrinsicBounds(0, 0, 2131231823, 0);
this.i0.a.G.setCompoundDrawablePadding(5);
this.i0.a.G.setOnClickListener(new s(this));
}
}
this.i0.a.H.setVisibility(0);
this.i0.a.I.setVisibility(8);
this.i0.a.H.setText(str);
if (AppController.j().E()) {
this.i0.a.H.setTextColor(getResources().getColor(2131101009));
} else {
this.i0.a.H.setTextColor(getResources().getColor(2131101008));
}
}
if (str.equalsIgnoreCase("LATEST")) {
BottomNavigationView bottomNavigationView = this.i0.a.b;
if (bottomNavigationView != null && bottomNavigationView.getMenu() != null && this.i0.a.b.getMenu().findItem(601) != null) {
this.i0.a.b.getMenu().findItem(601).setChecked(true);
}
} else if (str.equalsIgnoreCase("TRENDING")) {
if (this.i0.a.b.getMenu().findItem(701) != null) {
this.i0.a.b.getMenu().findItem(701).setChecked(true);
}
} else if (str.equalsIgnoreCase("MY READS")) {
if (this.i0.a.b.getMenu().findItem(301) != null) {
this.i0.a.b.getMenu().findItem(301).setChecked(true);
}
} else if (str.equalsIgnoreCase("PREMIUM")) {
if (this.i0.a.b.getMenu().findItem(801) != null) {
this.i0.a.b.getMenu().findItem(801).setChecked(true);
}
if (AppController.j().E()) {
BottomNavigationView bottomNavigationView2 = this.i0.a.b;
bottomNavigationView2.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView2.getContext(), 2131231605));
} else {
BottomNavigationView bottomNavigationView3 = this.i0.a.b;
bottomNavigationView3.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView3.getContext(), 2131231604));
}
this.i0.a.H.setVisibility(8);
} else if (str.equalsIgnoreCase("Top News")) {
if (this.i0.a.b.getMenu().findItem(1004) != null) {
this.i0.a.b.getMenu().findItem(1004).setChecked(true);
}
this.i0.a.H.setVisibility(8);
} else if (str.equalsIgnoreCase("NEWS")) {
if (this.i0.a.b.getMenu().findItem(201) != null) {
this.i0.a.b.getMenu().findItem(201).setChecked(true);
}
} else if (str.equalsIgnoreCase("FOR YOU")) {
if (this.i0.a.b.getMenu().findItem(501) != null) {
this.i0.a.b.getMenu().findItem(501).setChecked(true);
} else {
j4(str, false);
}
} else if (str.equalsIgnoreCase("MARKETS")) {
if (this.i0.a.b.getMenu().findItem(401) != null) {
this.i0.a.b.getMenu().findItem(401).setChecked(true);
} else {
f4(false, str);
}
this.i0.a.H.setVisibility(8);
} else if (str.equalsIgnoreCase("VIDEOS")) {
getSupportFragmentManager().findFragmentById(2131429286);
if (this.i0.a.b.getMenu().findItem(1000) != null) {
this.i0.a.b.getMenu().findItem(1000).setChecked(true);
this.i0.a.H.setVisibility(8);
} else {
this.i0.a.H.setVisibility(0);
}
K3();
BottomNavigationView bottomNavigationView4 = this.i0.a.b;
bottomNavigationView4.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView4.getContext(), 2131231606));
} else if (z2 && this.i0.a.b.getMenu().findItem(901) != null) {
this.i0.a.b.getMenu().findItem(901).setChecked(true);
}
B3();
this.i0.a.j.setVisibility(8);
MenuItem menuItem2 = this.s;
if (menuItem2 != null) {
menuItem2.setVisible(false);
}
MenuItem menuItem3 = this.r;
if (menuItem3 != null) {
menuItem3.setVisible(false);
}
MenuItem menuItem4 = this.t;
if (menuItem4 != null) {
menuItem4.setVisible(false);
}
if (!str.equalsIgnoreCase("watchlist")) {
if (str.equalsIgnoreCase("Global")) {
this.i0.a.H.setText(str);
this.i0.a.H.setVisibility(0);
return;
}
return;
}
invalidateOptionsMenu();
MenuItem menuItem5 = this.i;
if (menuItem5 != null) {
menuItem5.setVisible(false);
}
}
public void l(h.c cVar) {
String a = cVar.a();
if (!"ERROR_ABORT".equalsIgnoreCase(a)) {
Toast.makeText((Context) this, (CharSequence) "This action couldn't be processed at the moment. Please try again", 0).show();
}
WebEngageAnalytices.partnerEvents("Partner Counter Auth Fail", L0.o(), a);
}
public void l3() {
View a = b7.a.a(401, this.i0.a.b);
int i = getResources().getDisplayMetrics().widthPixels / 2;
f c = new f.a(this).f(a).d(-872415232).e(1).a(AppController.j().E() ? 2131624136 : 2131624135, 48, TypedValue.applyDimension(0, -(i - ((r1 / 5) + i)), getResources().getDisplayMetrics()), TypedValue.applyDimension(1, 10.0f, getResources().getDisplayMetrics()), 0.0f, 0.0f).c();
this.Q = c;
c.B(2131427741, new s0(this));
this.Q.B(2131431133, new t0(this));
}
public void m1() {
n.M(this, n.r1, n.p(this), (Content) null, "", new String[]{"subscribe"});
WebEngageAnalytices.trackClickEvents("Hamburger_Subscribe", (String) null, "", (Content) null, "Top Header", "", "");
Intent openPlanPageIntent = SubscriptionTrigger.openPlanPageIntent(this, "others", false);
openPlanPageIntent.putExtra("urlkey", "https://accounts.hindustantimes.com/lm/userplan");
openPlanPageIntent.putExtra("funnelName", "top_header");
SubscriptionPlanSingleton.getInstance().setContent((Content) null);
SSOSingleton.getInstance().setPlanPageReason("top_header");
SSOSingleton.getInstance().setPaywallReson("");
SubscriptionPlanSingleton.getInstance().setPianoExpName("");
openPlanPageIntent.putExtra("planpagecta", q.x.f.ordinal());
startActivityForResult(openPlanPageIntent, 1009);
}
public void m3() {
int i;
float f;
int i2;
String str = this.b;
int i3 = this.c;
if (TextUtils.isEmpty(str)) {
str = "Live Mint";
}
View a = b7.a.a(i3, this.i0.a.b);
Menu menu = this.i0.a.b.getMenu();
int size = menu != null ? menu.size() : 0;
if (menu != null) {
i = 0;
while (i < size) {
if (menu.getItem(i).getItemId() == i3) {
break;
} else {
i++;
}
}
}
i = -1;
if (a == null || i < 0 || i >= 5) {
return;
}
int i4 = getResources().getDisplayMetrics().widthPixels;
int i5 = AppController.j().E() ? 2131624143 : 2131624142;
int dimension = (int) getResources().getDimension(2131166227);
int a0 = f0.a0(15);
View inflate = LayoutInflater.from(this).inflate(i5, (ViewGroup) null);
TextView textView = (TextView) inflate.findViewById(2131431058);
if (textView != null) {
textView.setText(str);
}
ImageView imageView = (ImageView) inflate.findViewById(2131430972);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-2, -2);
int a02 = f0.a0(2);
if (size > 1) {
int i6 = size / 2;
if (i < i6) {
i2 = (-i4) / 5;
} else if (i > i6) {
i2 = i4 / 5;
} else if (i == i6 && size % 2 == 0) {
i2 = i4 / 5;
}
f = i2;
if (size != 1 || size == 2 || size == 3) {
layoutParams.setMargins((dimension / 2) - ((a0 * 3) / 4), -a02, 0, 0);
} else if (size != 4) {
if (size == 5) {
if (i == 2 || i == 3 || i == 1) {
layoutParams.setMargins((dimension / 2) - ((a0 * 3) / 4), -a02, 0, 0);
} else if (i == 0) {
layoutParams.setMargins(dimension / 9, -a02, 0, 0);
} else if (i == 4) {
layoutParams.setMargins((dimension / 5) * 4, -a02, 0, 0);
}
}
} else if (i == 0) {
layoutParams.setMargins((dimension / 5) - a0, -a02, 0, 0);
} else if (i == 1) {
layoutParams.setMargins(((dimension / 3) * 2) - a0, -a02, 0, 0);
} else if (i == 2) {
layoutParams.setMargins(dimension / 3, -a02, 0, 0);
} else if (i == 3) {
layoutParams.setMargins((dimension / 5) * 4, -a02, 0, 0);
}
imageView.setLayoutParams(layoutParams);
f c = new f.a(this).f(a).d(-872415232).e(1).b(inflate, 48, TypedValue.applyDimension(0, f, getResources().getDisplayMetrics()), TypedValue.applyDimension(1, 10.0f, getResources().getDisplayMetrics()), 0.0f, 0.0f).c();
this.P = c;
c.B(2131427741, new d1(this));
this.P.B(2131431133, new e1(this));
}
f = 0.0f;
if (size != 1) {
}
layoutParams.setMargins((dimension / 2) - ((a0 * 3) / 4), -a02, 0, 0);
imageView.setLayoutParams(layoutParams);
f c2 = new f.a(this).f(a).d(-872415232).e(1).b(inflate, 48, TypedValue.applyDimension(0, f, getResources().getDisplayMetrics()), TypedValue.applyDimension(1, 10.0f, getResources().getDisplayMetrics()), 0.0f, 0.0f).c();
this.P = c2;
c2.B(2131427741, new d1(this));
this.P.B(2131431133, new e1(this));
}
public void n1(FragmentManager fragmentManager) {
x1();
if (fragmentManager.findFragmentByTag("Top News") == null || !fragmentManager.getBackStackEntryAt(fragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("Top News")) {
Parcelable U0 = U0("top_news_tab", this.y);
TopStoriesFragment newInstance = TopStoriesFragment.Companion.newInstance(U0);
Bundle bundle = new Bundle();
bundle.putParcelable("top_section_section", U0);
newInstance.setArguments(bundle);
fragmentManager.beginTransaction().add(2131429286, newInstance, "Top News").addToBackStack("Top News").commitAllowingStateLoss();
AppController.L = AppController.K;
n.M(this, n.p1, "Top News", (Content) null, "", new String[]{"Top News"});
if (this.i0.a.b.getMenu().findItem(1004) != null) {
this.i0.a.b.getMenu().findItem(1004).setChecked(true);
}
invalidateOptionsMenu();
}
S3();
Config config = this.y;
if (config == null || config.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null || this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() == null) {
return;
}
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
}
public void n3() {
View a = b7.a.a(201, this.i0.a.b);
int i = getResources().getDisplayMetrics().widthPixels;
float f = (i / 2) - ((i / 5) + (i / 10));
int i2 = AppController.j().E() ? 2131624145 : 2131624144;
AppController.j().E();
f c = new f.a(this).f(a).d(-872415232).e(1).a(i2, 48, TypedValue.applyDimension(0, -f, getResources().getDisplayMetrics()), TypedValue.applyDimension(1, 10.0f, getResources().getDisplayMetrics()), 0.0f, 0.0f).c();
this.P = c;
c.B(2131427741, new k0(this));
this.P.B(2131431133, new l0(this));
}
public void n4(String str) {
u4.h.u(this, this.i0.p, 0, str).show();
}
public void o1() {
Bundle extras = getIntent().getExtras();
if (extras == null || !extras.containsKey("isNotification")) {
return;
}
int i = extras.getInt("isNotification");
q.m mVar = q.m.d;
if (i == mVar.ordinal() || extras.getInt("isNotification") == q.m.i.ordinal() || extras.getInt("isNotification") == q.m.j.ordinal()) {
s1(extras, mVar);
AppController.M = true;
return;
}
int i2 = extras.getInt("isNotification");
q.m mVar2 = q.m.e;
if (i2 != mVar2.ordinal()) {
int i3 = extras.getInt("isNotification");
q.m mVar3 = q.m.b;
if (i3 == mVar3.ordinal()) {
s1(extras, mVar3);
AppController.M = true;
return;
}
int i4 = extras.getInt("isNotification");
q.m mVar4 = q.m.c;
if (i4 == mVar4.ordinal()) {
s1(extras, mVar4);
return;
}
return;
}
q1(extras);
if (!extras.containsKey("isPlanPage")) {
s1(extras, mVar2);
} else if (extras.getBoolean("isPlanPage")) {
boolean z = AppController.j().l() != null && AppController.j().l().isSubscriptionActive();
boolean z2 = this.y.getSubscription() != null && this.y.getSubscription().isSubscriptionEnable();
if (!z && z2) {
Intent openPlanPageIntent = SubscriptionTrigger.openPlanPageIntent(this, "app_push", false);
openPlanPageIntent.putExtra("funnelName", "Push");
openPlanPageIntent.putExtra("urlkey", "https://www.livemint.com/");
openPlanPageIntent.putExtra("sectionkey", "Notification");
openPlanPageIntent.putExtra("planpagecta", q.x.h.ordinal());
SubscriptionPlanSingleton.getInstance().setContent((Content) null);
SubscriptionPlanSingleton.getInstance().setPianoExpName("");
startActivity(openPlanPageIntent);
}
}
AppController.M = true;
}
public void o4(boolean z) {
this.i0.a.h.setVisibility(8);
if (z) {
this.i0.a.x.setVisibility(8);
return;
}
if (AppController.j().g() == null || AppController.j().g().getAdsAndroidNew() == null || AppController.j().g().getAdsAndroidNew().getStoryBottomStickyAd() == null || !AppController.j().g().getAdsAndroidNew().getStoryBottomStickyAd().getStoryBottomStickyAdEnabled() || (!f0.P1() && (f0.O1() || CheckSubscriptionFromLocal.isAdFreeSubscribedUser(this)))) {
this.i0.a.x.setVisibility(8);
return;
}
this.i0.a.x.removeAllViews();
this.i0.a.x.setVisibility(0);
this.i0.a.x.addView(com.htmedia.mint.utils.k.o(this.V, this));
}
protected void onActivityResult(int i, int i2, Intent intent) {
TextView textView;
TextView textView2;
TextView textView3;
TextView textView4;
TextView textView5;
TextView textView6;
TextView textView7;
if (i != 1001) {
boolean z = false;
if (i == 102) {
if (intent != null && intent.hasExtra("isSignUp")) {
SubscriptionPlanSingleton.getInstance().setmNeedToSetPassword(intent.getBooleanExtra("isSignUp", false));
}
if (i2 == -1) {
i3();
HashMap hashMap = new HashMap();
String F1 = f0.F1(this);
if (F1 != null) {
hashMap.put("userEmail", F1);
}
if (f0.G1(this, "userName") != null) {
hashMap.put("userName", f0.G1(this, "userName"));
}
if (!hashMap.isEmpty()) {
com.htmedia.mint.utils.o0.i(hashMap);
}
EPaperPayWallBottomSheetFragment findFragmentByTag = getSupportFragmentManager().findFragmentByTag("epaper_paywall");
if (findFragmentByTag instanceof EPaperPayWallBottomSheetFragment) {
findFragmentByTag.dismissAllowingStateLoss();
f0.A2(this, (String) null);
SSOSingleton.getInstance().setPreviousScreenReferrer(n.a.e.a());
} else {
q3();
r3();
}
MintSubscriptionDetail l = AppController.j().l();
if (l != null) {
if (l.isSubscriptionActive() && (textView7 = this.E) != null) {
textView7.setVisibility(8);
}
if (!l.isSubscriptionActive() && !SubscriptionConverter.isChurnedUser(l) && !l.isMintSkuPlanActive()) {
OpenCheckoutPage.openCheckoutFromLoginForIPaywall(this);
} else if (l.isAdFreeUserToReLauch() || l.isMintSkuPlanActive()) {
f0.R2(getIntent(), this);
}
} else {
OpenCheckoutPage.openCheckoutFromLoginForIPaywall(this);
}
}
l.m(this, "IS_ONBOARDING_SYNC_COMPLETE", Boolean.FALSE);
C2();
} else if (i == 2009) {
if (intent != null && intent.hasExtra("isSignUp")) {
SubscriptionPlanSingleton.getInstance().setmNeedToSetPassword(intent.getBooleanExtra("isSignUp", false));
}
if (i2 == -1) {
HashMap hashMap2 = new HashMap();
String F12 = f0.F1(this);
if (F12 != null) {
hashMap2.put("userEmail", F12);
}
if (f0.G1(this, "userName") != null) {
hashMap2.put("userName", f0.G1(this, "userName"));
}
if (!hashMap2.isEmpty()) {
com.htmedia.mint.utils.o0.i(hashMap2);
}
EPaperPayWallBottomSheetFragment findFragmentByTag2 = getSupportFragmentManager().findFragmentByTag("epaper_paywall");
if (findFragmentByTag2 instanceof EPaperPayWallBottomSheetFragment) {
findFragmentByTag2.dismissAllowingStateLoss();
f0.A2(this, (String) null);
SSOSingleton.getInstance().setPreviousScreenReferrer(n.a.e.a());
} else {
q3();
r3();
}
MintSubscriptionDetail l2 = AppController.j().l();
if (l2 != null) {
if (l2.isSubscriptionActive() && (textView6 = this.E) != null) {
textView6.setVisibility(8);
}
if (!l2.isSubscriptionActive() && !SubscriptionConverter.isChurnedUser(l2) && !l2.isMintSkuPlanActive()) {
OpenCheckoutPage.openCheckoutFromLoginForIPaywall(this);
} else if (l2.isAdFreeUserToReLauch() || l2.isMintSkuPlanActive()) {
f0.R2(getIntent(), this);
}
} else {
OpenCheckoutPage.openCheckoutFromLoginForIPaywall(this);
}
}
l.m(this, "IS_ONBOARDING_SYNC_COMPLETE", Boolean.FALSE);
C2();
P0 = true;
new Handler().postDelayed(new g0(this), 300L);
} else if (i == 2088) {
String dataString = intent != null ? intent.getDataString() : "";
if (!TextUtils.isEmpty(dataString)) {
P0 = true;
new Handler().postDelayed(new h0(this, dataString), 300L);
}
} else if (i == 1009) {
if (i2 == -1) {
MintSubscriptionDetail l3 = AppController.j().l();
if (l3 != null && l3.isSubscriptionActive()) {
TextView textView8 = this.E;
if (textView8 != null) {
textView8.setVisibility(8);
}
if (l3.isAdFreeUserToReLauch()) {
f0.R2(getIntent(), this);
} else {
q3();
}
} else if (SubscriptionConverter.isSKUPlanActive(l3)) {
m1();
}
C2();
}
} else if (i == 9001) {
if (i2 == -1) {
MintSubscriptionDetail l4 = AppController.j().l();
if (l4 != null) {
if (l4.isSubscriptionActive() && (textView5 = this.E) != null) {
textView5.setVisibility(8);
}
if (l4.isAdFreeUserToReLauch()) {
f0.R2(getIntent(), this);
} else {
q3();
}
} else {
q3();
}
}
} else if (i == 1050) {
if (i2 == -1) {
MintSubscriptionDetail l5 = AppController.j().l();
if (l5 != null) {
if (l5.isSubscriptionActive() && (textView4 = this.E) != null) {
textView4.setVisibility(8);
}
if (l5.isAdFreeUserToReLauch()) {
f0.R2(getIntent(), this);
} else {
L0.m();
}
} else {
L0.m();
}
}
} else if (i == 5003) {
if (i2 == -1) {
H2();
}
} else if (i == 1012) {
if (i2 == -1) {
WhatsAppUpdatesBottomSheetFragment findFragmentByTag3 = getSupportFragmentManager().findFragmentByTag(WhatsAppUpdatesBottomSheetFragment.class.getSimpleName());
if (findFragmentByTag3 instanceof WhatsAppUpdatesBottomSheetFragment) {
findFragmentByTag3.dismiss();
}
new WhatsAppSubsSuccessDialogFragment().show(getSupportFragmentManager(), WhatsAppSubsSuccessDialogFragment.class.getSimpleName());
}
} else if (i == 2024) {
if (TextUtils.isEmpty(f0.G1(G0, "userClient"))) {
Toast.makeText((Context) G0, (CharSequence) "You need to login first to avail this offer.", 0).show();
} else {
if (intent != null && intent.hasExtra("isSignUp")) {
boolean booleanExtra = intent.getBooleanExtra("isSignUp", false);
getIntent().putExtra("needSetPassword", booleanExtra);
SubscriptionPlanSingleton.getInstance().setmNeedToSetPassword(booleanExtra);
}
HashMap hashMap3 = new HashMap();
String F13 = f0.F1(this);
if (F13 != null) {
hashMap3.put("userEmail", F13);
}
if (f0.G1(this, "userName") != null) {
hashMap3.put("userName", f0.G1(this, "userName"));
}
if (!hashMap3.isEmpty()) {
com.htmedia.mint.utils.o0.i(hashMap3);
}
MintSubscriptionDetail l6 = AppController.j().l();
if (l6 != null) {
if (l6.isSubscriptionActive() && (textView3 = this.E) != null) {
textView3.setVisibility(8);
}
if (l6.isAdFreeUserToReLauch() || l6.isSubscriptionActive()) {
f0.R2(getIntent(), this);
} else {
this.M.fetchPlanFromServer();
}
} else {
this.M.fetchPlanFromServer();
}
}
} else if (i == 1002 && i2 == -1) {
SubscriptionTrigger.openOnBoardJourneyVideo(this);
} else if (i == 1003 && i2 == -1) {
Intent intent2 = getIntent();
if (intent2 != null && intent2.getExtras() != null && intent2.getExtras().containsKey("needSetPassword")) {
z = intent2.getExtras().getBoolean("needSetPassword");
}
if (z) {
Intent intent3 = new Intent((Context) this, (Class<?>) LoginRegisterActivity.class);
intent3.putExtra("origin", "Subscription After");
intent3.setFlags(603979776);
startActivityForResult(intent3, 1002);
} else if (f0.R0(this) != q.n.c) {
Intent intent4 = new Intent((Context) this, (Class<?>) LoginRegisterActivity.class);
intent4.putExtra("origin", "Linking");
intent4.putExtra("linkingType", f0.R0(this).ordinal());
intent4.setFlags(603979776);
startActivityForResult(intent4, 1002);
} else {
SubscriptionTrigger.openOnBoardJourneyVideo(this);
}
} else if (i == 1004 && i2 == -1) {
MintSubscriptionDetail l7 = AppController.j().l();
if (l7 != null) {
if (l7.isSubscriptionActive() && (textView2 = this.E) != null) {
textView2.setVisibility(8);
}
if (l7.isAdFreeUserToReLauch()) {
f0.R2(getIntent(), this);
} else {
q3();
}
} else {
q3();
}
} else if (i == 1101 && i2 == -1) {
MintSubscriptionDetail l8 = AppController.j().l();
if (l8 != null && l8.isSubscriptionActive() && (textView = this.E) != null) {
textView.setVisibility(8);
}
if (l8 != null && l8.isAdFreeUserToReLauch() && l8.isSubscriptionActive()) {
f0.R2(getIntent(), this);
} else {
J0();
}
} else if (i == 90078 && i2 == -1) {
a3(getSupportFragmentManager());
} else if (i == 10022 && i2 == -1) {
b1(getSupportFragmentManager(), true, q.p.c.getId());
} else {
e7.g gVar = e7.f.a;
if (gVar != null && e7.f.b) {
gVar.e(i, i2, intent);
e7.f.b = false;
}
}
} else if (i2 == 0) {
l.m(this, "app_update_timestamp", Long.valueOf(System.currentTimeMillis()));
o1.a("HomeActivity", "Update flow failed! Result code: " + i2);
}
super/*androidx.fragment.app.FragmentActivity*/.onActivityResult(i, i2, intent);
}
public void onAppleLogin(SocialResponsePojo socialResponsePojo) {
}
public void onBackPressed() {
Fragment fragment;
JuspayCheckout juspayCheckout = this.v;
if (juspayCheckout == null || !(juspayCheckout == null || juspayCheckout.r())) {
J3();
PopupWindow popupWindow = StoryDetailViewFragment.popupWindow;
if (popupWindow != null) {
popupWindow.dismiss();
}
if (getSupportFragmentManager().getBackStackEntryCount() > 1) {
G2();
X3();
return;
}
if (this.x) {
if (getSupportFragmentManager().getBackStackEntryCount() == 1) {
getSupportFragmentManager().popBackStack();
}
k1.p(this, "terminate", "Home", this);
AppController.j().Y();
super/*androidx.activity.ComponentActivity*/.onBackPressed();
v1();
return;
}
int backStackEntryCount = getSupportFragmentManager().getBackStackEntryCount() - 1;
if (backStackEntryCount >= 0) {
fragment = getSupportFragmentManager().findFragmentByTag(getSupportFragmentManager().getBackStackEntryAt(backStackEntryCount).getName());
} else {
fragment = null;
}
if (fragment != null && (fragment instanceof HomeTabViewFragment)) {
HomeTabViewFragment homeTabViewFragment = (HomeTabViewFragment) fragment;
if (homeTabViewFragment.getSelectedPage() > 0) {
homeTabViewFragment.selectPage();
return;
}
}
this.x = true;
Toast.makeText((Context) this, (CharSequence) "Please click back again to exit.", 0).show();
new Handler().postDelayed(new i(this), 2000L);
}
}
public void onConfigurationChanged(@NonNull Configuration configuration) {
super/*androidx.appcompat.app.AppCompatActivity*/.onConfigurationChanged(configuration);
AppController.e(getIntent(), this);
}
@AddTrace(enabled = true, name = "onCreateTrace")
protected void onCreate(Bundle bundle) {
pk.process(this);
bi.b(this);
Trace startTrace = FirebasePerformance.startTrace("onCreateTrace");
super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
f0.Q3(this, System.currentTimeMillis(), f0.v1());
h2.c.a(this);
this.i0 = DataBindingUtil.setContentView(this, 2131623993);
Q0 = System.currentTimeMillis();
this.y = AppController.j().g();
if (getWindow() != null) {
getWindow().setSoftInputMode(32);
}
G0 = this;
this.a = new ViewModelProvider(this).get(e6.b.class);
J1();
this.w = new e7.g(this, this);
this.z = getApplication();
HashMap<String, String> hashMap = new HashMap<>();
this.A = hashMap;
hashMap.put("Authorization", q.a);
L0 = new com.htmedia.mint.partners.cred.b(this);
this.M = new OfferBannerHandler(this);
AppController.j().n().R(this, false);
addBackStackChangeListener();
this.J = new t(this, this);
this.K = new g(this, this);
runOnUiThread(new f1(this));
f0.j = System.currentTimeMillis();
l1();
j5.d.a(this);
A0(AppController.j().E());
try {
if (getIntent() != null && getIntent().getExtras() != null && getIntent().getExtras().containsKey("AppBack") && getIntent().getExtras().getBoolean("AppBack")) {
k1.q(this, "background");
}
} catch (Exception e) {
e.printStackTrace();
}
l4();
Config config = this.y;
if (config != null && config.getNewOnBoarding() != null && this.y.getNewOnBoarding().getVideo() != null && !TextUtils.isEmpty(this.y.getNewOnBoarding().getVideo().getUrl())) {
h0.b(this, this.y.getNewOnBoarding().getVideo().getUrl());
}
new n8.a().a();
H1();
u3(this.y);
AppController.j().d();
C0 = o.a.i(this, this.y);
startTrace.stop();
}
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(2131689474, menu);
this.L = menu;
this.g = menu.findItem(2131427434);
this.j = menu.findItem(2131427416);
this.q = menu.findItem(2131427430);
this.o = menu.findItem(2131427417);
this.h = menu.findItem(2131427429);
this.s = menu.findItem(2131427412);
this.r = menu.findItem(2131427433);
this.t = menu.findItem(2131427436);
View actionView = MenuItemCompat.getActionView(this.j);
MenuItem findItem = menu.findItem(2131427435);
View actionView2 = MenuItemCompat.getActionView(findItem);
this.F = (TextView) actionView.findViewById(2131431044);
TextView textView = (TextView) actionView2.findViewById(2131431493);
this.E = textView;
P3(textView);
if (AppController.j().l() != null) {
AppController.j().l().isSubscriptionActive();
}
boolean W0 = W0();
this.p = menu.findItem(2131427431);
this.i = menu.findItem(2131427428);
if (AppController.j().E()) {
if (this.u != 0) {
this.i.setIcon(2131232701);
} else {
this.i.setIcon(2131232702);
}
L3(true);
this.F.setCompoundDrawablesWithIntrinsicBounds(0, 2131232446, 0, 0);
this.q.setIcon(2131232878);
this.o.setIcon(2131232446);
} else {
Fragment findFragmentById = getSupportFragmentManager().findFragmentById(2131429286);
if (findFragmentById instanceof VideoListFragment) {
if (this.u != 0) {
this.i.setIcon(2131232701);
} else {
this.i.setIcon(2131232702);
}
this.F.setCompoundDrawablesWithIntrinsicBounds(0, 2131232446, 0, 0);
this.q.setIcon(2131232878);
this.o.setIcon(2131232446);
M3(true, findFragmentById);
} else {
if (this.u != 0) {
this.i.setIcon(2131232699);
} else {
this.i.setIcon(2131232700);
}
this.F.setCompoundDrawablesWithIntrinsicBounds(0, 2131232444, 0, 0);
L3(false);
this.q.setIcon(2131232870);
this.o.setIcon(2131232444);
}
}
if (AppController.j().E()) {
this.p.setIcon(getResources().getDrawable(2131234146));
} else {
this.p.setIcon(getResources().getDrawable(2131234145));
}
if (AppController.j().E()) {
this.g.setIcon(2131232683);
this.i0.a.G.setTextColor(ContextCompat.getColor(this, 2131100951));
} else if (getSupportFragmentManager().findFragmentById(2131429286) instanceof VideoListFragment) {
this.g.setIcon(2131232683);
this.i0.a.G.setTextColor(ContextCompat.getColor(this, 2131100951));
} else {
this.g.setIcon(2131232681);
this.i0.a.G.setTextColor(ContextCompat.getColor(this, 2131100859));
}
if (AppController.j().E()) {
this.r.setIcon(getResources().getDrawable(2131232901));
this.t.setIcon(getResources().getDrawable(2131232948));
} else {
this.r.setIcon(getResources().getDrawable(2131232891));
this.t.setIcon(getResources().getDrawable(2131232947));
}
actionView.setOnClickListener(new d(this));
actionView2.setOnClickListener(new e(this, findItem));
Fragment findFragmentById2 = getSupportFragmentManager().findFragmentById(2131429286);
if (findFragmentById2 instanceof LefMenuRevampFragment) {
this.i.setVisible(true);
this.p.setVisible(true);
this.h.setVisible(false);
this.g.setVisible(false);
this.E.setVisibility(8);
this.i0.a.j.setVisibility(8);
this.j.setVisible(false);
this.o.setVisible(true);
findItem.setVisible(false);
this.s.setVisible(false);
this.r.setVisible(false);
this.t.setVisible(false);
} else if (findFragmentById2 instanceof NewsInNumberDetailsFragment) {
this.i.setVisible(false);
this.p.setVisible(false);
this.h.setVisible(false);
this.g.setVisible(false);
this.E.setVisibility(8);
this.j.setVisible(false);
this.o.setVisible(false);
findItem.setVisible(false);
this.i0.a.j.setVisibility(0);
MenuItem menuItem = this.U;
if (menuItem != null) {
menuItem.setVisible(false);
}
MenuItem menuItem2 = this.T;
if (menuItem2 != null) {
menuItem2.setVisible(false);
}
this.q.setVisible(false);
this.i.setVisible(false);
findItem.setVisible(false);
this.s.setVisible(true);
this.r.setVisible(true);
this.t.setVisible(true);
} else if (findFragmentById2 instanceof StoryDetailFragment) {
this.i.setVisible(false);
this.p.setVisible(false);
this.h.setVisible(false);
this.g.setVisible(false);
this.E.setVisibility(8);
this.j.setVisible(false);
this.o.setVisible(false);
findItem.setVisible(false);
this.i0.a.j.setVisibility(0);
MenuItem menuItem3 = this.U;
if (menuItem3 != null) {
menuItem3.setVisible(false);
}
MenuItem menuItem4 = this.T;
if (menuItem4 != null) {
menuItem4.setVisible(false);
}
this.q.setVisible(false);
this.i.setVisible(false);
findItem.setVisible(false);
this.s.setVisible(true);
this.r.setVisible(true);
this.t.setVisible(true);
} else if (findFragmentById2 instanceof SearchFragment) {
this.i.setVisible(true);
this.q.setVisible(false);
this.i0.a.b.setVisibility(8);
this.p.setVisible(false);
this.g.setVisible(true);
this.j.setVisible(false);
this.o.setVisible(false);
this.i0.a.j.setVisibility(8);
if (f0.G1(this, "userName") != null) {
this.g.setVisible(false);
this.h.setVisible(true);
} else {
this.g.setVisible(true);
this.h.setVisible(false);
}
if ((AppController.j().l() != null && AppController.j().l().isSubscriptionActive()) || !W0) {
this.E.setVisibility(8);
findItem.setVisible(false);
} else {
findItem.setVisible(true);
this.E.setVisibility(0);
}
this.s.setVisible(false);
this.r.setVisible(false);
this.t.setVisible(false);
} else if (findFragmentById2 instanceof MintPillerViewAllFragment) {
this.i.setVisible(false);
this.p.setVisible(false);
this.h.setVisible(false);
this.g.setVisible(false);
this.E.setVisibility(8);
this.j.setVisible(false);
this.o.setVisible(false);
this.i0.a.H.setVisibility(0);
findItem.setVisible(false);
this.i0.a.j.setVisibility(8);
MenuItem menuItem5 = this.U;
if (menuItem5 != null) {
menuItem5.setVisible(false);
}
MenuItem menuItem6 = this.T;
if (menuItem6 != null) {
menuItem6.setVisible(false);
}
this.q.setVisible(false);
this.i.setVisible(false);
findItem.setVisible(false);
this.s.setVisible(true);
this.r.setVisible(true);
this.t.setVisible(true);
this.i0.a.b.setVisibility(8);
this.i0.a.x.setVisibility(8);
this.i0.a.h.setVisibility(8);
} else if (this.j0) {
this.i.setVisible(false);
this.p.setVisible(false);
this.i0.a.j.setVisibility(8);
this.g.setVisible(false);
this.j.setVisible(false);
this.o.setVisible(false);
this.E.setVisibility(8);
this.s.setVisible(false);
this.r.setVisible(false);
this.t.setVisible(false);
} else {
this.i.setVisible(true);
this.q.setVisible(true);
this.p.setVisible(false);
this.g.setVisible(true);
this.j.setVisible(false);
this.i0.a.j.setVisibility(8);
if (f0.G1(this, "userName") != null) {
this.g.setVisible(false);
this.h.setVisible(true);
} else {
this.g.setVisible(true);
this.h.setVisible(false);
}
if ((AppController.j().l() != null && AppController.j().l().isSubscriptionActive()) || !W0) {
this.E.setVisibility(8);
findItem.setVisible(false);
this.o.setVisible(true);
} else {
findItem.setVisible(true);
this.E.setVisibility(0);
this.o.setVisible(false);
}
this.s.setVisible(false);
this.r.setVisible(false);
this.t.setVisible(false);
}
if (findFragmentById2 != null && (findFragmentById2 instanceof HomeFragment)) {
this.r.setVisible(!TextUtils.isEmpty(this.e0));
}
return true;
}
protected void onDestroy() {
super/*androidx.appcompat.app.AppCompatActivity*/.onDestroy();
F0 = false;
this.R = null;
D3(null);
}
public void onError(e7.b bVar) {
}
public void onError(String str) {
o1.a("RECO EVENT LOG: ", "FAILED");
}
public void onExecute(e7.h hVar, Object obj) {
}
public boolean onNavigationItemSelected(MenuItem menuItem) {
if (AppController.j().E()) {
BottomNavigationView bottomNavigationView = this.i0.a.b;
bottomNavigationView.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView.getContext(), 2131231606));
} else {
BottomNavigationView bottomNavigationView2 = this.i0.a.b;
bottomNavigationView2.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView2.getContext(), 2131231603));
}
J3();
h3();
FragmentManager supportFragmentManager = getSupportFragmentManager();
int itemId = menuItem.getItemId();
f0.J0();
E1();
w1();
D1();
StringBuilder sb = new StringBuilder();
sb.append("");
sb.append(itemId);
h5.c.q(this, "" + itemId, h5.c.e(this, sb.toString()) + 1);
if (itemId == 101) {
x1();
try {
supportFragmentManager.popBackStackImmediate((String) null, 1);
} catch (Exception e) {
e.printStackTrace();
}
HomeTabViewFragment homeTabViewFragment = new HomeTabViewFragment();
Bundle bundle = new Bundle();
if (getIntent().getExtras() == null || !getIntent().getExtras().containsKey("author_name")) {
Section U0 = U0("foryou_page_analytics", this.y);
bundle.putParcelable("top_section_section", U0);
String X1 = X1();
if (!TextUtils.isEmpty(X1)) {
bundle.putString("deeplinkpage", X1);
}
homeTabViewFragment.setArguments(bundle);
supportFragmentManager.beginTransaction().add(2131429286, homeTabViewFragment, "HOME").addToBackStack("HOME").commitAllowingStateLoss();
if (U0 != null && U0.getDisplayName() != null) {
AppController.K = U0.getDisplayName();
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{U0.getDisplayName()});
}
} else {
homeTabViewFragment.setArguments(getIntent().getExtras());
supportFragmentManager.beginTransaction().add(2131429286, homeTabViewFragment, getIntent().getExtras().getString("author_name")).addToBackStack(getIntent().getExtras().getString("author_name")).commitAllowingStateLoss();
}
} else if (itemId == 501) {
x1();
A1();
if (supportFragmentManager.findFragmentByTag("FOR YOU") == null || !supportFragmentManager.getBackStackEntryAt(supportFragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("FOR YOU")) {
HomeFragment homeFragment = new HomeFragment();
Bundle bundle2 = new Bundle();
if (f0.G1(this, "userName") != null) {
f0.G1(this, "userClient");
} else {
f6.d.b(this);
}
Section U02 = U0("foryou_tab", this.y);
bundle2.putParcelable("top_section_section", U02);
homeFragment.setArguments(bundle2);
supportFragmentManager.beginTransaction().add(2131429286, homeFragment, "FOR YOU").addToBackStack("FOR YOU").commitAllowingStateLoss();
AppController.L = AppController.K;
AppController.K = U02.getDisplayName();
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{U02.getDisplayName()});
Config config = this.y;
String homeAdId = (config == null || config.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null) ? "" : this.y.getAdsAndroidNew().getBottomStickyAd().getHomeAdId();
e4(true, TextUtils.isEmpty(homeAdId) ? "" : homeAdId, new Section());
}
} else if (itemId == 401) {
if (supportFragmentManager.findFragmentByTag("MARKETS") == null || !supportFragmentManager.getBackStackEntryAt(supportFragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("MARKETS")) {
a1(supportFragmentManager);
}
} else if (itemId == 301) {
x1();
A1();
if (supportFragmentManager.findFragmentByTag("MY READS") == null || !supportFragmentManager.getBackStackEntryAt(supportFragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("MY READS")) {
j4("MY READS", false);
supportFragmentManager.beginTransaction().add(2131429286, new MyReadsFragment(), "MY READS").addToBackStack("MY READS").commitAllowingStateLoss();
}
AppController.L = AppController.K;
AppController.K = "My Reads";
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{"My Reads"});
Config config2 = this.y;
if (config2 != null && config2.getAdsAndroidNew() != null && this.y.getAdsAndroidNew().getBottomStickyAd() != null && this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() != null) {
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
}
} else if (itemId == 801) {
x1();
A1();
if (supportFragmentManager.findFragmentByTag("PREMIUM") == null || !supportFragmentManager.getBackStackEntryAt(supportFragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("PREMIUM")) {
PremiumNewsSubsectionFragment premiumNewsSubsectionFragment = new PremiumNewsSubsectionFragment();
Bundle bundle3 = new Bundle();
Section U03 = U0("premium_section", this.y);
bundle3.putParcelable("top_section_section", U03);
premiumNewsSubsectionFragment.setArguments(bundle3);
supportFragmentManager.beginTransaction().add(2131429286, premiumNewsSubsectionFragment, "PREMIUM").addToBackStack("PREMIUM").commitAllowingStateLoss();
AppController.L = AppController.K;
AppController.K = U03.getDisplayName();
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{U03.getDisplayName()});
}
f4(true, getString(2131952436));
} else if (itemId == 1004) {
x1();
A1();
if (supportFragmentManager.findFragmentByTag("Top News") == null || !supportFragmentManager.getBackStackEntryAt(supportFragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("Top News")) {
Parcelable U04 = U0("top_news_tab", this.y);
TopStoriesFragment newInstance = TopStoriesFragment.Companion.newInstance(U04);
Bundle bundle4 = new Bundle();
bundle4.putParcelable("top_section_section", U04);
newInstance.setArguments(bundle4);
supportFragmentManager.beginTransaction().add(2131429286, newInstance, "Top News").addToBackStack("Top News").commitAllowingStateLoss();
AppController.L = AppController.K;
AppController.K = U04.getDisplayName();
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{U04.getDisplayName()});
}
S3();
Config config3 = this.y;
if (config3 != null && config3.getAdsAndroidNew() != null && this.y.getAdsAndroidNew().getBottomStickyAd() != null && this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() != null) {
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
}
} else if (itemId == 201) {
v3(supportFragmentManager);
} else if (itemId == 901) {
x1();
Parcelable U05 = U0("global_tab", this.y);
if (U05 != null && !TextUtils.isEmpty(U05.getTabImageId()) && U05.getTabImageId().toLowerCase(Locale.ENGLISH).contains("economist")) {
if (AppController.j().E()) {
BottomNavigationView bottomNavigationView3 = this.i0.a.b;
bottomNavigationView3.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView3.getContext(), 2131231605));
} else {
BottomNavigationView bottomNavigationView4 = this.i0.a.b;
bottomNavigationView4.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView4.getContext(), 2131231605));
}
}
if (supportFragmentManager.findFragmentByTag("GLOBAL") == null || !supportFragmentManager.getBackStackEntryAt(supportFragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("GLOBAL")) {
HomeFragment homeFragment2 = new HomeFragment();
Bundle bundle5 = new Bundle();
bundle5.putParcelable("top_section_section", U05);
homeFragment2.setArguments(bundle5);
supportFragmentManager.beginTransaction().add(2131429286, homeFragment2, "GLOBAL").addToBackStack("GLOBAL").commitAllowingStateLoss();
AppController.L = AppController.K;
AppController.K = Q0(U05);
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{U05.getDisplayName()});
}
Config config4 = this.y;
if (config4 != null && config4.getAdsAndroidNew() != null && this.y.getAdsAndroidNew().getBottomStickyAd() != null && this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() != null) {
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
}
} else if (itemId == 601) {
x1();
if (supportFragmentManager.findFragmentByTag("LATEST") == null || !supportFragmentManager.getBackStackEntryAt(supportFragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("LATEST")) {
Parcelable U06 = U0("1534506343254", this.y);
HomeFragment homeFragment3 = new HomeFragment();
Bundle bundle6 = new Bundle();
bundle6.putParcelable("top_section_section", U06);
homeFragment3.setArguments(bundle6);
supportFragmentManager.beginTransaction().add(2131429286, homeFragment3, "LATEST").addToBackStack("LATEST").commitAllowingStateLoss();
AppController.L = AppController.K;
AppController.K = U06.getDisplayName();
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{U06.getDisplayName()});
}
Config config5 = this.y;
if (config5 != null && config5.getAdsAndroidNew() != null && this.y.getAdsAndroidNew().getBottomStickyAd() != null && this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() != null) {
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
}
} else if (itemId == 1000) {
x1();
BottomNavigationView bottomNavigationView5 = this.i0.a.b;
bottomNavigationView5.setItemIconTintList(ContextCompat.getColorStateList(bottomNavigationView5.getContext(), 2131231606));
if (supportFragmentManager.findFragmentByTag("VIDEOS") == null || !supportFragmentManager.getBackStackEntryAt(supportFragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("VIDEOS")) {
Parcelable U07 = U0("video_tab", this.y);
VideoListFragment newInstance2 = VideoListFragment.newInstance(true);
Bundle bundle7 = new Bundle();
bundle7.putParcelable("top_section_section", U07);
bundle7.putBoolean("is_from_bottom_nav", true);
newInstance2.setArguments(bundle7);
supportFragmentManager.beginTransaction().add(2131429286, newInstance2, "VIDEOS").addToBackStack("VIDEOS").commitAllowingStateLoss();
AppController.L = AppController.K;
AppController.K = U07.getDisplayName();
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{U07.getDisplayName()});
}
Config config6 = this.y;
if (config6 != null && config6.getAdsAndroidNew() != null && this.y.getAdsAndroidNew().getBottomStickyAd() != null && this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() != null) {
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
}
} else if (itemId == 701) {
x1();
if (supportFragmentManager.findFragmentByTag("TRENDING") == null || !supportFragmentManager.getBackStackEntryAt(supportFragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("TRENDING")) {
Parcelable U08 = U0("popular_page", this.y);
HomeFragment homeFragment4 = new HomeFragment();
Bundle bundle8 = new Bundle();
bundle8.putParcelable("top_section_section", U08);
homeFragment4.setArguments(bundle8);
supportFragmentManager.beginTransaction().add(2131429286, homeFragment4, "TRENDING").addToBackStack("TRENDING").commitAllowingStateLoss();
AppController.L = AppController.K;
AppController.K = U08.getDisplayName();
n.M(this, n.p1, AppController.L, (Content) null, "", new String[]{U08.getDisplayName()});
}
Config config7 = this.y;
if (config7 != null && config7.getAdsAndroidNew() != null && this.y.getAdsAndroidNew().getBottomStickyAd() != null && this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId() != null) {
e4(false, this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId(), new Section());
}
} else if (itemId == 1001) {
n4.b.v("Mint Short", true);
j1(getSupportFragmentManager());
} else if (itemId == 1004) {
n1(getSupportFragmentManager());
} else if (itemId == 1002) {
n4.b.v("Daily Capsule", true);
Section U09 = U0("daily_capsule", this.y);
String url = U09 != null ? U09.getUrl() : "";
String displayName = U09 != null ? U09.getDisplayName() : "Daily Capsule";
String str = TextUtils.isEmpty(displayName) ? "Daily Capsule" : displayName;
j1.h0(this, url, q.m.c);
n.M(this, n.p1, "daily capsule", (Content) null, str, new String[]{str.toLowerCase()});
} else if (itemId == 1003) {
d1(true, this.d);
} else if (itemId == 1020) {
Intent intent = new Intent((Context) this, (Class<?>) CRIFWebView.class);
Section U010 = U0("generic_tab", this.y);
String displayName2 = U010 != null ? U010.getDisplayName() : "Generic Tab";
String str2 = TextUtils.isEmpty(displayName2) ? "Generic Tab" : displayName2;
startActivity(intent);
n4.b.G(this, "lmapp_navbar");
n.M(this, n.p1, str2, (Content) null, str2, new String[]{str2.toLowerCase()});
}
return true;
}
protected void onNewIntent(Intent intent) {
super/*androidx.activity.ComponentActivity*/.onNewIntent(intent);
onCreate(intent.getExtras());
}
public boolean onOptionsItemSelected(MenuItem menuItem) {
sg sgVar;
ArrayList<? extends Parcelable> results;
int itemId = menuItem.getItemId();
if (itemId == 16908332) {
G2();
return true;
}
if (itemId == 2131427412) {
StoryDetailFragment findFragmentById = getSupportFragmentManager().findFragmentById(2131429286);
if (findFragmentById instanceof StoryDetailFragment) {
StoryDetailViewFragment findFragmentByTag = findFragmentById.getChildFragmentManager().findFragmentByTag("android:switcher:2131432063:" + findFragmentById.getViewPagerCurrentItem());
if (findFragmentByTag instanceof StoryDetailViewFragment) {
findFragmentByTag.bookmark(menuItem);
}
}
return true;
}
int i = 0;
String str = "";
if (itemId == 2131427422) {
MarketDashboardNewFragment findFragmentById2 = getSupportFragmentManager().findFragmentById(2131429286);
if (this.y.getMarketMenuSection() != null && !this.y.getMarketMenuSection().isEmpty()) {
while (true) {
if (i >= this.y.getMarketMenuSection().size()) {
break;
}
if (findFragmentById2 == null || !(findFragmentById2 instanceof MarketDashboardNewFragment) || (sgVar = findFragmentById2.binding) == null || sgVar.b.getCurrentItem() != i) {
i++;
} else {
String newName = ((MarketMenuItem) this.y.getMarketMenuSection().get(i)).getNewName();
if (TextUtils.isEmpty(newName)) {
newName = ((MarketMenuItem) this.y.getMarketMenuSection().get(i)).getName();
}
if (((MarketMenuItem) this.y.getMarketMenuSection().get(i)).getId().equalsIgnoreCase(q.p.h.getId())) {
newName = getString(2131952266);
}
str = newName;
n.G(this, str);
}
}
}
E2(str);
return true;
}
switch (itemId) {
case 2131427416:
case 2131427417:
J2("?utm_source=androidapp&utm_medium=topnav&utm_campaign=promo");
break;
default:
switch (itemId) {
case 2131427428:
n.M(this, n.r1, n.p(this), (Content) null, "", new String[]{"Notification"});
k1.x(k1.l(this), "/Notification");
if (AppController.j().E()) {
this.i.setIcon(2131232702);
} else {
this.i.setIcon(2131232700);
}
LinearLayout linearLayout = this.i0.i;
if (linearLayout != null) {
linearLayout.setVisibility(4);
}
FragmentManager supportFragmentManager = getSupportFragmentManager();
LefMenuRevampFragment findFragmentById3 = getSupportFragmentManager().findFragmentById(2131429286);
NotificationCenterFragment notificationCenterFragment = new NotificationCenterFragment();
if (this.u > 0) {
f0.i3(this, "notofication_click", new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss+SSSS").format(Calendar.getInstance().getTime()));
this.u = 0;
Bundle bundle = new Bundle();
if (findFragmentById3 != null && !(findFragmentById3 instanceof LefMenuRevampFragment) && (results = findFragmentById3.getResults()) != null) {
bundle.putParcelableArrayList("list", results);
}
notificationCenterFragment.setArguments(bundle);
}
supportFragmentManager.beginTransaction().add(2131429286, notificationCenterFragment, "NotificationCenter").addToBackStack("NotificationCenter").commitAllowingStateLoss();
break;
case 2131427429:
k1();
c1();
break;
case 2131427430:
E2("");
break;
case 2131427431:
startActivityForResult(new Intent((Context) this, (Class<?>) SettingsActivity.class), 90078);
break;
default:
switch (itemId) {
case 2131427433:
StoryDetailFragment findFragmentById4 = getSupportFragmentManager().findFragmentById(2131429286);
if (!(findFragmentById4 instanceof StoryDetailFragment)) {
if ((findFragmentById4 instanceof HomeFragment) && !TextUtils.isEmpty(this.e0)) {
String screenName = ((HomeFragment) findFragmentById4).getScreenName();
String str2 = TextUtils.isEmpty(screenName) ? "" : screenName;
n.S(this, "social_interaction_click", str2 + "_topic_page", " ", "mint_special_topic_page", (Content) null, str2, new String[]{"share"});
v2.i(this, this.f0, this.e0);
break;
}
} else {
StoryDetailViewFragment findFragmentByTag2 = findFragmentById4.getChildFragmentManager().findFragmentByTag("android:switcher:2131432063:" + findFragmentById4.getViewPagerCurrentItem());
if (findFragmentByTag2 instanceof StoryDetailViewFragment) {
findFragmentByTag2.share();
break;
}
}
break;
case 2131427434:
O2("Home Login");
k1();
break;
case 2131427435:
m1();
break;
case 2131427436:
StoryDetailFragment findFragmentById5 = getSupportFragmentManager().findFragmentById(2131429286);
if (findFragmentById5 instanceof StoryDetailFragment) {
StoryDetailViewFragment findFragmentByTag3 = findFragmentById5.getChildFragmentManager().findFragmentByTag("android:switcher:2131432063:" + findFragmentById5.getViewPagerCurrentItem());
if (findFragmentByTag3 instanceof StoryDetailViewFragment) {
findFragmentByTag3.textSize();
break;
}
}
break;
case 2131427437:
d3();
break;
}
}
break;
}
return true;
}
protected void onPause() {
super/*androidx.fragment.app.FragmentActivity*/.onPause();
y4();
f0.b = true;
o1.a("HomeActivity", "super.onPause()");
H0();
l0 l0Var = this.z0;
if (l0Var != null) {
l0Var.e();
}
}
public void onPaymentError(int i, String str, PaymentData paymentData) {
this.Y.onPaymentError(i, str, paymentData);
}
public void onPaymentSuccess(String str, PaymentData paymentData) {
this.Y.onPaymentSuccess(str, paymentData);
}
public void onPremiumMeterError(String str) {
q3();
Toast.makeText((Context) this, (CharSequence) getResources().getString(2131952559), 0).show();
}
public boolean onPrepareOptionsMenu(Menu menu) {
boolean z;
boolean z2;
BottomNavigationView bottomNavigationView;
BottomNavigationView bottomNavigationView2;
MenuItem findItem;
BottomNavigationView bottomNavigationView3;
MenuItem findItem2;
boolean z3;
y1(false);
this.h = menu.findItem(2131427429);
this.g = menu.findItem(2131427434);
this.j = menu.findItem(2131427416);
MenuItem findItem3 = menu.findItem(2131427437);
this.T = findItem3;
View actionView = MenuItemCompat.getActionView(findItem3);
TextView textView = (TextView) actionView.findViewById(2131431768);
ImageView imageView = (ImageView) actionView.findViewById(2131428954);
MenuItem findItem4 = menu.findItem(2131427422);
this.U = findItem4;
TextView textView2 = (TextView) MenuItemCompat.getActionView(findItem4).findViewById(2131431469);
View actionView2 = MenuItemCompat.getActionView(this.U);
this.s = menu.findItem(2131427412);
this.r = menu.findItem(2131427433);
this.t = menu.findItem(2131427436);
this.i = menu.findItem(2131427428);
View actionView3 = MenuItemCompat.getActionView(this.j);
MenuItem findItem5 = menu.findItem(2131427435);
View actionView4 = MenuItemCompat.getActionView(findItem5);
if (actionView4 != null) {
this.E = (TextView) actionView4.findViewById(2131431493);
}
P3(this.E);
if (AppController.j().E()) {
this.p.setIcon(getResources().getDrawable(2131234146));
} else {
this.p.setIcon(getResources().getDrawable(2131234145));
}
if (AppController.j().E()) {
this.r.setIcon(getResources().getDrawable(2131232901));
this.t.setIcon(getResources().getDrawable(2131232948));
} else {
this.r.setIcon(getResources().getDrawable(2131232891));
this.t.setIcon(getResources().getDrawable(2131232947));
}
Fragment findFragmentById = getSupportFragmentManager().findFragmentById(2131429286);
if (AppController.j().E()) {
this.g.setIcon(2131232683);
if (this.u != 0) {
this.i.setIcon(2131232701);
} else {
this.i.setIcon(2131232702);
}
this.F.setTextColor(getResources().getColor(2131100951));
this.F.setCompoundDrawablesWithIntrinsicBounds(0, 2131232446, 0, 0);
this.o.setIcon(2131232446);
L3(true);
if (textView != null) {
textView.setTextColor(getResources().getColor(2131100796));
}
textView2.setTextColor(getResources().getColor(2131100951));
if (imageView != null) {
imageView.setBackground(ContextCompat.getDrawable(this, 2131234360));
}
textView2.setCompoundDrawablesWithIntrinsicBounds(0, 2131234121, 0, 0);
} else {
if (findFragmentById == null || !(findFragmentById instanceof VideoListFragment)) {
this.g.setIcon(2131232681);
if (this.u != 0) {
this.i.setIcon(2131232699);
} else {
this.i.setIcon(2131232700);
}
} else {
this.g.setIcon(2131232683);
if (this.u != 0) {
this.i.setIcon(2131232701);
} else {
this.i.setIcon(2131232702);
}
}
this.F.setTextColor(getResources().getColor(2131100859));
if (findFragmentById instanceof VideoListFragment) {
z = false;
this.F.setCompoundDrawablesWithIntrinsicBounds(0, 2131232446, 0, 0);
this.o.setIcon(2131232446);
} else {
z = false;
this.F.setCompoundDrawablesWithIntrinsicBounds(0, 2131232444, 0, 0);
this.o.setIcon(2131232444);
}
M3(z, findFragmentById);
if (textView != null) {
textView.setTextColor(getResources().getColor(2131100796));
}
textView2.setTextColor(getResources().getColor(2131100859));
if (imageView != null) {
imageView.setBackground(ContextCompat.getDrawable(this, 2131233042));
}
textView2.setCompoundDrawablesWithIntrinsicBounds(0, 2131234112, 0, 0);
}
this.F = (TextView) actionView3.findViewById(2131431044);
boolean isSubscribedUser = CheckSubscriptionFromLocal.isSubscribedUser(this);
if (this.y == null) {
this.y = AppController.j().g();
}
Config config = this.y;
boolean z4 = (config == null || config.getSubscription() == null || !this.y.getSubscription().isSubscriptionEnable()) ? false : true;
actionView4.setOnClickListener(new g(this, findItem5));
actionView2.setOnClickListener(new a1(this));
actionView.setOnClickListener(new b1(this));
MarketDashboardNewFragment findFragmentById2 = getSupportFragmentManager().findFragmentById(2131429286);
if (findFragmentById2 instanceof MarketDashboardNewFragment) {
this.i0.a.g.setVisibility(8);
this.o.setVisible(false);
this.i0.a.j.setVisibility(8);
MarketDashboardNewFragment marketDashboardNewFragment = findFragmentById2;
this.U.setVisible(marketDashboardNewFragment.binding.b.getCurrentItem() != 0);
this.T.setVisible(t4());
this.q.setVisible(false);
this.i.setVisible(false);
this.j.setVisible(false);
this.h.setVisible(false);
this.j.setVisible(false);
this.E.setVisibility(8);
findItem5.setVisible(false);
this.i0.a.J.setVisibility(8);
this.i0.a.g.setVisibility(0);
if (this.i0.a.b.getMenu().findItem(401) != null) {
this.i0.a.J.setText(getString(2131952183));
if (AppController.j().E()) {
this.i0.a.g.setImageDrawable(ContextCompat.getDrawable(this, 2131233487));
} else {
this.i0.a.g.setImageDrawable(ContextCompat.getDrawable(this, 2131233488));
}
this.i0.a.H.setVisibility(8);
z3 = false;
} else {
z3 = false;
this.i0.a.H.setVisibility(0);
this.i0.a.H.setText(getString(2131952183));
this.i0.a.L.setVisibility(0);
}
this.g.setVisible(z3);
this.h.setVisible(z3);
this.s.setVisible(z3);
this.r.setVisible(z3);
this.t.setVisible(z3);
marketDashboardNewFragment.showAds();
this.i0.a.o.setVisibility(8);
} else if (findFragmentById2 instanceof StoryDetailFragment) {
A1();
this.i0.a.j.setVisibility(0);
this.i0.a.g.setVisibility(8);
this.o.setVisible(false);
this.U.setVisible(false);
this.T.setVisible(false);
this.j.setVisible(false);
this.q.setVisible(false);
this.i.setVisible(false);
this.j.setVisible(false);
this.E.setVisibility(8);
findItem5.setVisible(false);
this.i0.a.J.setVisibility(8);
this.g.setVisible(false);
this.h.setVisible(false);
this.i0.a.H.setVisibility(8);
this.s.setVisible(true);
this.r.setVisible(true);
this.t.setVisible(true);
this.i0.a.o.setVisibility(8);
} else if (findFragmentById2 instanceof NewsInNumberDetailsFragment) {
A1();
this.i0.a.j.setVisibility(0);
this.i0.a.g.setVisibility(8);
this.o.setVisible(false);
this.U.setVisible(false);
this.T.setVisible(false);
this.j.setVisible(false);
this.q.setVisible(false);
this.i.setVisible(false);
this.j.setVisible(false);
this.E.setVisibility(8);
findItem5.setVisible(false);
this.i0.a.J.setVisibility(8);
this.g.setVisible(false);
this.h.setVisible(false);
this.i0.a.H.setVisibility(8);
this.s.setVisible(false);
this.r.setVisible(false);
this.t.setVisible(false);
this.i0.a.o.setVisibility(8);
this.i0.a.p.setVisibility(8);
} else if (findFragmentById2 instanceof MintPillerViewAllFragment) {
this.r.setVisible(false);
this.t.setVisible(false);
this.s.setVisible(false);
this.i0.a.x.setVisibility(8);
this.i0.a.h.setVisibility(8);
this.i0.a.b.setVisibility(8);
this.i0.a.j.setVisibility(8);
this.i0.a.g.setVisibility(8);
this.o.setVisible(false);
this.U.setVisible(false);
this.T.setVisible(false);
this.j.setVisible(false);
this.q.setVisible(false);
this.i.setVisible(false);
this.j.setVisible(false);
this.E.setVisibility(8);
findItem5.setVisible(false);
this.i0.a.H.setVisibility(0);
this.g.setVisible(false);
this.h.setVisible(false);
this.i0.a.o.setVisibility(8);
this.i0.a.p.setVisibility(8);
} else if (findFragmentById2 instanceof SearchFragment) {
this.i.setVisible(true);
this.i0.a.j.setVisibility(8);
this.p.setVisible(false);
this.i0.a.b.setVisibility(8);
this.U.setVisible(false);
this.T.setVisible(false);
this.q.setVisible(false);
if (f0.G1(this, "userName") != null) {
this.g.setVisible(false);
this.h.setVisible(true);
} else {
this.g.setVisible(true);
this.h.setVisible(false);
}
findItem5.setVisible(!isSubscribedUser && z4);
x1();
this.s.setVisible(false);
this.r.setVisible(false);
this.t.setVisible(false);
this.i0.a.o.setVisibility(8);
A1();
} else if ((findFragmentById2 instanceof WatchlistSearchFragment) || (findFragmentById2 instanceof MyWatchlistListingFragment) || (findFragmentById2 instanceof EditWatchListFragment)) {
this.i.setVisible(false);
this.i0.a.j.setVisibility(8);
this.p.setVisible(false);
this.U.setVisible(false);
this.q.setVisible(false);
this.T.setVisible(false);
this.g.setVisible(false);
this.h.setVisible(false);
findItem5.setVisible(false);
x1();
this.s.setVisible(false);
this.r.setVisible(false);
this.t.setVisible(false);
this.i0.a.o.setVisibility(8);
this.f.setTitle("Back");
} else if (findFragmentById2 != null && !(findFragmentById2 instanceof LefMenuRevampFragment)) {
this.i.setVisible(true);
this.i0.a.j.setVisibility(8);
this.p.setVisible(false);
this.U.setVisible(false);
this.T.setVisible(false);
if (f0.G1(this, "userName") != null) {
this.g.setVisible(false);
this.h.setVisible(true);
} else {
this.g.setVisible(true);
this.h.setVisible(false);
}
findItem5.setVisible(!isSubscribedUser && z4);
x1();
this.s.setVisible(false);
this.r.setVisible(false);
this.t.setVisible(false);
this.i0.a.o.setVisibility(8);
} else if (findFragmentById2 == null || !(findFragmentById2 instanceof LefMenuRevampFragment)) {
this.i0.a.j.setVisibility(8);
this.i.setVisible(true);
this.p.setVisible(true);
if (findFragmentById2 != null) {
z2 = false;
this.i0.a.o.setVisibility(0);
} else {
z2 = false;
}
this.g.setVisible(z2);
this.h.setVisible(z2);
findItem5.setVisible(z2);
this.j.setVisible(z2);
this.o.setVisible(true);
this.U.setVisible(z2);
this.T.setVisible(z2);
this.s.setVisible(z2);
this.r.setVisible(z2);
this.t.setVisible(z2);
A1();
} else {
y1(true);
}
if (findFragmentById2 != null && (findFragmentById2 instanceof HomeFragment)) {
this.r.setVisible(!TextUtils.isEmpty(this.e0));
} else if (findFragmentById2 != null && (findFragmentById2 instanceof g8.f)) {
f4(false, "INFOGRAPHICS");
this.i.setVisible(true);
this.i0.a.j.setVisibility(8);
this.p.setVisible(false);
this.i0.a.b.setVisibility(8);
this.U.setVisible(false);
this.T.setVisible(false);
this.q.setVisible(false);
if (f0.G1(this, "userName") != null) {
this.g.setVisible(false);
this.h.setVisible(true);
} else {
this.g.setVisible(true);
this.h.setVisible(false);
}
findItem5.setVisible(!isSubscribedUser && z4);
x1();
this.s.setVisible(false);
this.r.setVisible(false);
this.t.setVisible(false);
this.i0.a.o.setVisibility(8);
A1();
} else if (findFragmentById2 != null && (findFragmentById2 instanceof s4.c)) {
this.i.setVisible(true);
this.i0.a.j.setVisibility(8);
this.p.setVisible(false);
this.i0.a.b.setVisibility(8);
this.U.setVisible(false);
this.T.setVisible(false);
this.q.setVisible(false);
if (f0.G1(this, "userName") != null) {
this.g.setVisible(false);
this.h.setVisible(true);
} else {
this.g.setVisible(true);
this.h.setVisible(false);
}
findItem5.setVisible(!isSubscribedUser && z4);
x1();
this.s.setVisible(false);
this.r.setVisible(false);
this.t.setVisible(false);
this.i0.a.o.setVisibility(8);
A1();
}
if (findFragmentById2 instanceof NewsLatestAndTrendingFragment) {
F2(getString(2131952291), 201);
} else if (findFragmentById2 instanceof MintShortsFragment) {
F2("Mint Shorts", 1001);
}
if ((findFragmentById2 instanceof PremiumNewsSubsectionFragment) && (bottomNavigationView3 = this.i0.a.b) != null && bottomNavigationView3.getMenu() != null && (findItem2 = this.i0.a.b.getMenu().findItem(801)) != null) {
findItem2.setChecked(true);
}
if ((findFragmentById2 instanceof TopStoriesFragment) && (bottomNavigationView2 = this.i0.a.b) != null && bottomNavigationView2.getMenu() != null && (findItem = this.i0.a.b.getMenu().findItem(1004)) != null) {
findItem.setChecked(true);
}
if ((findFragmentById2 instanceof v5.l) && (bottomNavigationView = this.i0.a.b) != null && bottomNavigationView.getMenu() != null && this.i0.a.b.getMenu().findItem(1003) != null) {
this.i0.a.b.setVisibility(0);
this.i0.a.b.getMenu().findItem(1003).setChecked(true);
}
if (findFragmentById2 instanceof s4.q) {
this.i0.a.b.setVisibility(8);
}
if ((findFragmentById2 instanceof VideoListFragment) && this.i0.a.b.getMenu().findItem(1000) != null) {
this.i0.a.b.getMenu().findItem(1000).setChecked(true);
}
if (!TextUtils.isEmpty(this.W)) {
H3(this.W);
}
return super/*android.app.Activity*/.onPrepareOptionsMenu(menu);
}
protected void onRestart() {
super/*android.app.Activity*/.onRestart();
o1.a("HomeActivity", "super.onRestart()");
this.e = true;
f0.b = false;
}
protected void onResume() {
super/*androidx.fragment.app.FragmentActivity*/.onResume();
try {
if (getIntent() != null && getIntent().getExtras() != null && getIntent().getExtras().containsKey("AppBack") && getIntent().getExtras().getBoolean("AppBack")) {
k1.q(this, "background");
}
invalidateOptionsMenu();
J3();
N1();
M2();
} catch (Exception e) {
e.printStackTrace();
}
}
protected void onStart() {
super/*androidx.appcompat.app.AppCompatActivity*/.onStart();
if (f0.b) {
M0();
}
o1.a("HomeActivity", "super.onStart()");
f0.b = false;
this.b0 = false;
new Thread((Runnable) new i0(this)).start();
}
protected void onStop() {
super/*androidx.appcompat.app.AppCompatActivity*/.onStop();
stopTimer();
f0.B3(this, true);
H0();
if (f0.b) {
HomeFragment findFragmentById = getSupportFragmentManager().findFragmentById(2131429286);
if (findFragmentById != null && (findFragmentById instanceof HomeFragment)) {
k1.p(this, "background", findFragmentById.getScreenName(), this);
} else if (findFragmentById != null && (findFragmentById instanceof MyReadsFragment)) {
k1.p(this, "background", "My Reads", this);
} else if (findFragmentById != null && (findFragmentById instanceof LefMenuRevampFragment)) {
k1.p(this, "background", "Explore", this);
} else if (findFragmentById != null && (findFragmentById instanceof DEWidgetViewAllFragment)) {
k1.p(this, "background", ((DEWidgetViewAllFragment) findFragmentById).getScreenName(), this);
}
AppController.j().Y();
Bundle extras = getIntent().getExtras();
if (extras == null) {
extras = new Bundle();
}
extras.putBoolean("AppBack", true);
getIntent().putExtras(extras);
G0 = null;
if (f0.L0() != f0.Q0()) {
n.c(this, n.O2, "", "", (Content) null, f0.n1(f0.L0()), n.T2);
f0.v3(f0.L0());
}
}
g3();
}
public void onSubscriptionError(SubscriptionError subscriptionError) {
com.htmedia.mint.utils.o0.e(subscriptionError.getErrorCode().name(), subscriptionError.getMessage(), getClass().getName());
f0.d3(this);
v0();
if (subscriptionError.getErrorCode() == ErrorCode.TOKEN_EXPIRE) {
p1.b(this, "Your session has expired. Please login again to continue.");
}
}
public void p3() {
for (HomeFragment homeFragment : getSupportFragmentManager().getFragments()) {
if (homeFragment != null && (homeFragment instanceof HomeFragment)) {
homeFragment.updateAndRefreshList();
}
}
}
public void p4() {
z1(false);
i4("");
this.i0.a.j.setVisibility(0);
this.i0.a.H.setVisibility(8);
this.i0.a.I.setVisibility(8);
MenuItem menuItem = this.i;
if (menuItem != null) {
menuItem.setVisible(true);
}
MenuItem menuItem2 = this.h;
if (menuItem2 != null) {
menuItem2.setVisible(false);
}
MenuItem menuItem3 = this.g;
if (menuItem3 != null) {
menuItem3.setVisible(false);
}
MenuItem menuItem4 = this.q;
if (menuItem4 != null) {
menuItem4.setVisible(false);
}
MenuItem menuItem5 = this.i;
if (menuItem5 != null) {
menuItem5.setVisible(false);
}
MenuItem menuItem6 = this.s;
if (menuItem6 != null) {
menuItem6.setVisible(true);
}
MenuItem menuItem7 = this.r;
if (menuItem7 != null) {
menuItem7.setVisible(true);
}
MenuItem menuItem8 = this.t;
if (menuItem8 != null) {
menuItem8.setVisible(true);
}
x1();
if (this.f == null) {
this.f = findViewById(2131430942);
}
this.f.setNavigationIcon((Drawable) null);
this.i0.a.G.setVisibility(8);
this.i0.a.H.setVisibility(8);
this.i0.a.g.setVisibility(8);
this.i0.a.p.setVisibility(8);
x3();
invalidateOptionsMenu();
}
public void q3() {
List fragments = getSupportFragmentManager().getFragments();
if (fragments == null || fragments.size() <= 0) {
return;
}
int size = fragments.size() - 1;
if (size < 0) {
int backStackEntryCount = getSupportFragmentManager().getBackStackEntryCount() - 1;
if (backStackEntryCount >= 0) {
HomeFragment homeFragment = (Fragment) fragments.get(backStackEntryCount);
if (homeFragment instanceof HomeFragment) {
homeFragment.updateAndRefreshList();
return;
}
return;
}
return;
}
HomeFragment homeFragment2 = (Fragment) fragments.get(size);
if (homeFragment2 instanceof HomeFragment) {
homeFragment2.updateAndRefreshList();
return;
}
int backStackEntryCount2 = getSupportFragmentManager().getBackStackEntryCount() - 1;
if (backStackEntryCount2 >= 0) {
HomeFragment homeFragment3 = (Fragment) fragments.get(backStackEntryCount2);
if (homeFragment3 instanceof HomeFragment) {
homeFragment3.updateAndRefreshList();
}
}
}
public void q4() {
if (this.i0.a.q.getHeight() == 0) {
CoordinatorLayout.LayoutParams layoutParams = this.i0.a.q.getLayoutParams();
((ViewGroup.MarginLayoutParams) layoutParams).height = -2;
this.i0.a.q.setLayoutParams(layoutParams);
}
}
public void r4() {
this.i0.a.C.setVisibility(0);
}
public void s1(Bundle bundle, q.m mVar) {
String str;
if (!bundle.containsKey("primarypage")) {
E0(bundle, mVar.ordinal());
return;
}
String string = bundle.getString("primarypage");
Log.e("handlePrimaryPage: ", string);
if (TextUtils.isEmpty(string)) {
string = "";
}
if (bundle.getString("urlkey") != null) {
str = bundle.getString("urlkey") + " ";
} else {
str = "";
}
if (string.equalsIgnoreCase(s0.o0.b())) {
if (X0(501)) {
return;
}
E0(bundle, mVar.ordinal());
return;
}
int i = 0;
if (string.equalsIgnoreCase(s0.s1.b())) {
this.d = string;
if (X0(1003)) {
return;
}
d1(false, this.d);
return;
}
s0 s0Var = s0.K1;
if (string.equalsIgnoreCase(s0Var.b())) {
if (!h1.f(this) || P0) {
return;
}
if (getIntent() != null && getIntent().hasExtra("url") && getIntent().getStringExtra("url").contains("giftCode")) {
if (f0.n2(this)) {
L2();
return;
} else {
if (getIntent() == null || !getIntent().hasExtra("url")) {
return;
}
m4(getIntent().getStringExtra("url"));
return;
}
}
if (f0.n2(this)) {
T2();
return;
}
Intent intent = new Intent((Context) this, (Class<?>) GiftSubscriptionAndStatisticsActivity.class);
intent.putExtra("is_from_subs_gift", true);
if (getIntent() != null && getIntent().hasExtra("url")) {
intent.putExtra("url", getIntent().getStringExtra("url"));
}
startActivityForResult(intent, 2088);
return;
}
if (string.equalsIgnoreCase(s0.t1.b())) {
this.d = string;
if (X0(1003)) {
return;
}
d1(false, this.d);
return;
}
if (string.equalsIgnoreCase(s0.w1.b())) {
this.d = s0.u1.b();
if (X0(1003)) {
return;
}
d1(false, this.d);
return;
}
s0 s0Var2 = s0.v1;
if (string.equalsIgnoreCase(s0Var2.b()) && !TextUtils.isEmpty(str) && str.contains("?id=")) {
Y0(j1.P(str, "id"));
return;
}
if (string.equalsIgnoreCase(s0Var2.a())) {
Z0(false);
return;
}
if (string.equalsIgnoreCase(s0.u1.a())) {
Z0(true);
return;
}
s0 s0Var3 = s0.x1;
if (string.equalsIgnoreCase(s0Var3.b())) {
D2(s0Var3.b());
return;
}
s0 s0Var4 = s0.y1;
if (string.equalsIgnoreCase(s0Var4.b())) {
D2(s0Var4.b());
return;
}
s0 s0Var5 = s0.z1;
if (string.equalsIgnoreCase(s0Var5.b())) {
D2(s0Var5.b());
return;
}
s0 s0Var6 = s0.A1;
if (string.equalsIgnoreCase(s0Var6.b())) {
D2(s0Var6.b());
return;
}
if (string.equalsIgnoreCase(s0.I1.a())) {
startActivity(new Intent((Context) this, (Class<?>) OnboardingFirstPartyActivity.class));
return;
}
if (string.equalsIgnoreCase(s0.B1.b())) {
this.d = string;
if (X0(1003)) {
return;
}
d1(false, this.d);
return;
}
if (string.equalsIgnoreCase(s0Var.b())) {
return;
}
if (string.equalsIgnoreCase(s0.U.b())) {
bundle.putParcelable("top_section_section", U0("foryou_tab", this.y));
if (X0(501)) {
return;
}
E0(bundle, mVar.ordinal());
return;
}
if (string.equalsIgnoreCase(s0.m1.b())) {
bundle.putParcelable("top_section_section", U0("mint_shorts", this.y));
if (X0(1001)) {
return;
}
E0(bundle, mVar.ordinal());
return;
}
if (string.equalsIgnoreCase(s0.n1.b())) {
bundle.putParcelable("top_section_section", U0("top_news_tab", this.y));
if (X0(1004)) {
return;
}
E0(bundle, mVar.ordinal());
return;
}
if (string.equalsIgnoreCase(s0.j1.b())) {
if (AppController.S) {
return;
}
e eVar = new e();
eVar.b("Platform", "Android");
eVar.b("Domain", "LM");
try {
i = Integer.parseInt(bundle.getString("percentage"));
} catch (Exception unused) {
}
g4(i, eVar);
AppController.S = true;
return;
}
if (string.equalsIgnoreCase(s0.k1.b())) {
if (AppController.T) {
return;
}
e eVar2 = new e();
eVar2.b("Platform", "Android");
eVar2.b("Domain", "LM");
try {
i = Integer.parseInt(bundle.getString("percentage"));
} catch (Exception unused2) {
}
a4(i, eVar2);
AppController.T = true;
return;
}
if (string.equalsIgnoreCase(s0.Y.b())) {
boolean X0 = X0(201);
bundle.putParcelable("top_section_section", U0("news_page", this.y));
if (X0) {
return;
}
E0(bundle, mVar.ordinal());
return;
}
if (string.equalsIgnoreCase(s0.d0.b())) {
new Handler().postDelayed(new i0(this), 1000L);
return;
}
if (string.equalsIgnoreCase(s0.p0.b())) {
if (X0(401)) {
return;
}
E0(bundle, mVar.ordinal());
return;
}
if (string.equalsIgnoreCase(s0.x0.b())) {
new Handler().postDelayed(new a(this), 1000L);
return;
}
if (string.equalsIgnoreCase(s0.J0.b())) {
if (TextUtils.isEmpty(f0.G1(this, "userToken"))) {
O2(mVar.name());
return;
}
return;
}
if (string.equalsIgnoreCase(s0.F1.b())) {
if (TextUtils.isEmpty(f0.G1(this, "userToken"))) {
O2(mVar.name());
return;
} else {
startActivity(new Intent((Context) this, (Class<?>) EditProfileActivity.class));
return;
}
}
if (string.equalsIgnoreCase(s0.G1.b())) {
c1();
return;
}
if (string.equalsIgnoreCase(s0.S1.b())) {
if (TextUtils.isEmpty(str) || !str.contains("/credit-score") || str.contains(".html")) {
f0.z2(this, str);
return;
} else {
startActivity(new Intent((Context) this, (Class<?>) CRIFWebView.class));
return;
}
}
if (string.equalsIgnoreCase(s0.K0.b())) {
J2("?utm_source=androidapp&utm_medium=topnav&utm_campaign=promo");
return;
}
s0 s0Var7 = s0.L1;
if (string.equalsIgnoreCase(s0Var7.b())) {
o.a.k(this, new Bundle());
return;
}
if (string.equalsIgnoreCase(s0.N1.b())) {
o.a.k(this, new Bundle());
return;
}
if (string.equalsIgnoreCase(s0.O1.b())) {
o.a.k(this, new Bundle());
return;
}
s0 s0Var8 = s0.M1;
if (string.equalsIgnoreCase(s0Var8.b())) {
o.a aVar = o.a;
aVar.j(this, (Section) null, aVar.e(str), "");
return;
}
if (string.equalsIgnoreCase(s0.P1.b())) {
o.a aVar2 = o.a;
aVar2.j(this, (Section) null, aVar2.e(str), "");
return;
}
if (string.equalsIgnoreCase(s0.T1.b())) {
o.a aVar3 = o.a;
aVar3.j(this, (Section) null, aVar3.e(str), "");
} else if (string.equalsIgnoreCase(s0Var7.b())) {
o.a.k(this, new Bundle());
} else if (string.equalsIgnoreCase(s0Var8.b())) {
o.a aVar4 = o.a;
aVar4.j(this, (Section) null, aVar4.e(str), "");
}
}
public void s3() {
MarketDashboardNewFragment findFragmentById;
if (!(getSupportFragmentManager().findFragmentById(2131429286) instanceof HomeTabViewFragment)) {
if (!(getSupportFragmentManager().findFragmentById(2131429286) instanceof MarketDashboardNewFragment) || (findFragmentById = getSupportFragmentManager().findFragmentById(2131429286)) == null) {
return;
}
findFragmentById.updateNightMood();
return;
}
HomeTabViewFragment findFragmentById2 = getSupportFragmentManager().findFragmentById(2131429286);
if (findFragmentById2 != null) {
HomeTabViewFragment homeTabViewFragment = findFragmentById2;
homeTabViewFragment.updateNightMood();
homeTabViewFragment.refresh();
}
}
public void s4(Content content) {
this.i0.a.A.setVisibility(0);
this.i0.a.t.b.setVisibility(8);
this.i0.a.A.setOnClickListener(new f0(this, content));
}
public void t1() {
MenuItem menuItem = this.s;
if (menuItem != null) {
menuItem.setVisible(false);
}
}
public void t3(boolean z) {
x3();
if (z) {
this.i0.a.p.setVisibility(8);
} else {
this.i0.a.p.setVisibility(0);
}
}
public void u1(boolean z) {
BottomNavigationView bottomNavigationView = this.i0.a.b;
if (bottomNavigationView != null) {
if (z) {
bottomNavigationView.setVisibility(8);
} else {
bottomNavigationView.setVisibility(0);
}
}
}
public void u3(Config config) {
NewsListConfig newsListConfig = (config == null || config.getNewsListConfig() == null) ? null : config.getNewsListConfig();
if (newsListConfig != null) {
ArrayList arrayList = newsListConfig.getHomeHeaderConfig() != null ? (ArrayList) newsListConfig.getHomeHeaderConfig().getDisplayLogic() : new ArrayList();
if (arrayList == null || arrayList.size() <= 0) {
return;
}
o.a.a(this);
}
}
public void v1() {
LinearLayout linearLayout = this.i0.i;
if (linearLayout != null) {
linearLayout.setVisibility(4);
}
y4();
F3(false);
}
public void v3(FragmentManager fragmentManager) {
x1();
if (fragmentManager.findFragmentByTag("NEWS") == null || !fragmentManager.getBackStackEntryAt(fragmentManager.getBackStackEntryCount() - 1).getName().equalsIgnoreCase("NEWS")) {
x1();
NewsLatestAndTrendingFragment newsLatestAndTrendingFragment = new NewsLatestAndTrendingFragment();
newsLatestAndTrendingFragment.setArguments(new Bundle());
fragmentManager.beginTransaction().add(2131429286, newsLatestAndTrendingFragment, "NEWS").addToBackStack("NEWS").commitAllowingStateLoss();
AppController.L = AppController.K;
n.M(this, n.p1, n.L0, (Content) null, "", new String[]{"NEWS"});
if (this.i0.a.b.getMenu().findItem(201) != null) {
this.i0.a.b.getMenu().findItem(201).setChecked(true);
}
f4(true, getString(2131952291));
invalidateOptionsMenu();
}
f4(true, getString(2131952291));
Config config = this.y;
String sectionAdId = (config == null || config.getAdsAndroidNew() == null || this.y.getAdsAndroidNew().getBottomStickyAd() == null) ? "" : this.y.getAdsAndroidNew().getBottomStickyAd().getSectionAdId();
e4(false, TextUtils.isEmpty(sectionAdId) ? "" : sectionAdId, new Section());
}
public void w1() {
this.k0 = false;
this.i0.a.t.b.setVisibility(8);
}
public void w3() {
Toolbar toolbar = this.f;
if (toolbar == null) {
toolbar.setTitle("Back");
if (AppController.j().E()) {
this.f.setTitleTextColor(ResourcesCompat.getColor(getResources(), 2131101009, (Resources.Theme) null));
this.i0.a.H.setTextColor(ResourcesCompat.getColor(getResources(), 2131101009, (Resources.Theme) null));
this.i0.a.H.setBackgroundColor(ResourcesCompat.getColor(getResources(), 2131100008, (Resources.Theme) null));
this.f.setNavigationIcon(2131231333);
return;
}
this.f.setTitleTextColor(ResourcesCompat.getColor(getResources(), 2131101008, (Resources.Theme) null));
this.i0.a.H.setTextColor(ResourcesCompat.getColor(getResources(), 2131101008, (Resources.Theme) null));
this.i0.a.H.setBackgroundColor(ResourcesCompat.getColor(getResources(), 2131101002, (Resources.Theme) null));
this.f.setNavigationIcon(2131231330);
}
}
public void x4() {
RecyclerView recyclerView;
LinearLayoutManager layoutManager;
try {
int backStackEntryCount = getSupportFragmentManager().getBackStackEntryCount() - 1;
for (int i = 0; i <= backStackEntryCount; i++) {
HomeFragment findFragmentByTag = getSupportFragmentManager().findFragmentByTag(getSupportFragmentManager().getBackStackEntryAt(i).getName());
if ((findFragmentByTag instanceof HomeFragment) && (recyclerView = findFragmentByTag.binding.c) != null && (layoutManager = recyclerView.getLayoutManager()) != null) {
int childCount = layoutManager.getChildCount();
for (int i2 = 0; i2 < childCount; i2++) {
View findViewByPosition = layoutManager.findViewByPosition(layoutManager.findFirstVisibleItemPosition() + i2);
if (findViewByPosition != null) {
LinearLayout linearLayout = (LinearLayout) findViewByPosition.findViewById(2131432131);
LinearLayout linearLayout2 = (LinearLayout) findViewByPosition.findViewById(2131428341);
WebView webView = linearLayout != null ? (WebView) linearLayout.findViewById(2131432098) : linearLayout2 != null ? (WebView) linearLayout2.findViewById(2131432098) : null;
if (webView != null) {
if (i == backStackEntryCount) {
webView.onResume();
} else if (i < backStackEntryCount) {
webView.onPause();
}
}
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void y1(boolean z) {
if (this.f == null) {
this.f = findViewById(2131430942);
}
Toolbar toolbar = this.f;
if (toolbar != null) {
if (z) {
toolbar.setVisibility(8);
} else {
toolbar.setVisibility(0);
}
}
if (z) {
this.i0.a.d.setVisibility(8);
} else {
this.i0.a.d.setVisibility(0);
}
}
public void y4() {
RecyclerView recyclerView;
LinearLayoutManager layoutManager;
try {
int backStackEntryCount = getSupportFragmentManager().getBackStackEntryCount() - 1;
for (int i = 0; i <= backStackEntryCount; i++) {
HomeFragment findFragmentByTag = getSupportFragmentManager().findFragmentByTag(getSupportFragmentManager().getBackStackEntryAt(i).getName());
if ((findFragmentByTag instanceof HomeFragment) && (recyclerView = findFragmentByTag.binding.c) != null && (layoutManager = recyclerView.getLayoutManager()) != null) {
int childCount = layoutManager.getChildCount();
for (int i2 = 0; i2 < childCount; i2++) {
View findViewByPosition = layoutManager.findViewByPosition(layoutManager.findFirstVisibleItemPosition() + i2);
if (findViewByPosition != null) {
ViewGroup viewGroup = (ViewGroup) findViewByPosition.getParent();
int i3 = 0;
while (true) {
if (i3 >= viewGroup.getChildCount()) {
break;
}
WebView webView = (WebView) viewGroup.getChildAt(i3).findViewWithTag("inline_webView");
if (webView != null) {
webView.reload();
break;
}
i3++;
}
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void z1(boolean z) {
k4 k4Var = this.i0.a;
View view = k4Var.L;
if (view != null) {
if (!z) {
view.setVisibility(8);
} else {
k4Var.K.setVisibility(0);
this.i0.a.L.setVisibility(0);
}
}
}
public void z4() {
r rVar = new r(this, this);
this.B = rVar;
rVar.e(0, "HomeActivity", "https://images.livemint.com/apps/v3/deviceconfig.json", true, true);
}
}