正在查看: OLX India v19.42.007 应用的 BottomNavActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: OLX India v19.42.007 应用的 BottomNavActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.olxgroup.panamera.app.buyers.home.activities;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentSender;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.FrameLayout;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
import androidx.activity.result.ActivityResult;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
import com.google.android.gms.common.api.ApiException;
import com.google.android.gms.common.api.ResolvableApiException;
import com.google.android.material.R;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.snackbar.Snackbar;
import com.google.firebase.inappmessaging.FirebaseInAppMessaging;
import com.naspers.advertising.baxterandroid.domain.manager.w;
import com.naspers.ragnarok.core.entity.Transferable;
import com.naspers.ragnarok.domain.constant.Constants;
import com.olx.southasia.databinding.am;
import com.olx.southasia.databinding.ug;
import com.olxgroup.panamera.app.buyers.cxe.activities.IntentWidgetActivity;
import com.olxgroup.panamera.app.buyers.cxe.fragments.CxeLandingFragment;
import com.olxgroup.panamera.app.buyers.home.fragments.DisableNotificationPopUpFragment;
import com.olxgroup.panamera.app.buyers.home.fragments.SearchExperienceFragment;
import com.olxgroup.panamera.app.buyers.home.viewModels.a;
import com.olxgroup.panamera.app.buyers.listings.fragments.ABResultFragment;
import com.olxgroup.panamera.app.chat.fragments.DeloreanInboxFragment;
import com.olxgroup.panamera.app.common.helpers.DialogHelper;
import com.olxgroup.panamera.app.common.infra.m2;
import com.olxgroup.panamera.app.common.rateus.RateUsActivity;
import com.olxgroup.panamera.app.common.services.q;
import com.olxgroup.panamera.app.common.utils.k0;
import com.olxgroup.panamera.app.common.utils.k1;
import com.olxgroup.panamera.app.common.utils.l0;
import com.olxgroup.panamera.app.common.utils.m1;
import com.olxgroup.panamera.app.common.utils.q1;
import com.olxgroup.panamera.app.common.utils.x;
import com.olxgroup.panamera.app.common.utils.x0;
import com.olxgroup.panamera.app.seller.myAds.fragments.MyPublishedAdsListFragment;
import com.olxgroup.panamera.app.users.dealerShowroom.e;
import com.olxgroup.panamera.app.users.myAccount.fragments.MyAccountFragment;
import com.olxgroup.panamera.domain.buyers.c2b.entities.C2BConfigUIModel;
import com.olxgroup.panamera.domain.buyers.common.entity.ad.KycStatusAd;
import com.olxgroup.panamera.domain.buyers.common.repository.BuyersABTestRepository;
import com.olxgroup.panamera.domain.buyers.common.repository.ILocationExperiment;
import com.olxgroup.panamera.domain.buyers.listings.repository.ListingsTrackingService;
import com.olxgroup.panamera.domain.buyers.listings.repository.ResultsContextRepository;
import com.olxgroup.panamera.domain.common.DispatcherProvider;
import com.olxgroup.panamera.domain.common.permission.PermissionService;
import com.olxgroup.panamera.domain.common.tracking.repository.AppStartupTrackingService;
import com.olxgroup.panamera.domain.common.tracking.repository.PlatformTrackingService;
import com.olxgroup.panamera.domain.common.tracking.repository.TrackingContextParams;
import com.olxgroup.panamera.domain.common.tracking.repository.TrackingContextRepository;
import com.olxgroup.panamera.domain.common.tracking.repository.TrackingService;
import com.olxgroup.panamera.domain.seller.monetdraft.entity.MonetCartStatusResponse;
import com.olxgroup.panamera.domain.users.common.entity.User;
import com.olxgroup.panamera.domain.users.kyc.entity.KycVerificationStatus;
import com.olxgroup.panamera.domain.users.profile.tracking.ProfileTrackingService;
import com.olxgroup.panamera.domain.users.showroom.entity.ShowroomType;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import kotlin.Lazy;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.collections.MapsKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import kotlin.jvm.internal.Reflection;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.o0;
import kotlinx.coroutines.q0;
import olx.com.delorean.data.repository.datasource.FeatureToggleDeviceStorage;
import olx.com.delorean.dialog.DraftMonetBottomSheetDialog;
import olx.com.delorean.dialog.h0;
import olx.com.delorean.dialog.locationnudge.d;
import olx.com.delorean.dialog.locationnudge.e;
import olx.com.delorean.domain.repository.CategorizationRepository;
import olx.com.delorean.domain.repository.UserSessionRepository;
import olx.com.delorean.domain.service.RateUsService;
import olx.com.delorean.domain.service.UpdateCountryConfigurationService;
import olx.com.delorean.domain.service.ab.ABTestService;
import olx.com.delorean.view.tooltip.Tooltip;
@Metadata
@SourceDebugExtension
public final class BottomNavActivity extends f0 implements BottomNavigationView.OnNavigationItemSelectedListener, com.olxgroup.panamera.app.buyers.home.presentationContract.a, olx.com.delorean.interfaces.a, y, olx.com.delorean.interfaces.e, h0, olx.com.delorean.interfaces.b, olx.com.delorean.interfaces.c, olx.com.delorean.interfaces.d {
public static final b I0 = new b(null);
public static final int J0 = 8;
private com.olx.southasia.databinding.c D0;
private com.naspers.advertising.baxterandroid.domain.manager.w E0;
private Tooltip F0;
public com.olxgroup.panamera.app.common.services.q e0;
public com.olxgroup.panamera.app.buyers.home.presenters.a f0;
public TrackingService g0;
public ProfileTrackingService h0;
public AppStartupTrackingService i0;
public ListingsTrackingService j0;
public PlatformTrackingService k0;
public RateUsService l0;
public UpdateCountryConfigurationService m0;
public TrackingContextRepository n0;
public BuyersABTestRepository o0;
public ABTestService p0;
public FeatureToggleDeviceStorage q0;
public UserSessionRepository r0;
public ILocationExperiment s0;
public DispatcherProvider t0;
private boolean u0;
private olx.com.delorean.dialog.locationnudge.d v0;
private com.olxgroup.panamera.app.users.dealerShowroom.e w0;
private Snackbar x0;
private com.olxgroup.panamera.app.buyers.home.dialogs.b z0;
private final int a0 = 12111;
private final int b0 = 1;
private final int c0 = 4;
private Set d0 = new HashSet();
private int y0 = com.olx.southasia.i.navigation_search;
private final Lazy A0 = new ViewModelLazy(Reflection.b(com.olxgroup.panamera.app.buyers.home.viewModels.a.class), new o(this), new n(this), new p(null, this));
private final Lazy B0 = new ViewModelLazy(Reflection.b(com.olxgroup.panamera.app.buyers.home.viewModels.g.class), new r(this), new q(this), new s(null, this));
private final Lazy C0 = new ViewModelLazy(Reflection.b(com.olxgroup.panamera.app.buyers.home.viewModels.c.class), new u(this), new t(this), new v(null, this));
private final androidx.activity.result.b G0 = registerForActivityResult(new androidx.activity.result.contract.c(), new androidx.activity.result.a() {
public final void a(Object obj) {
BottomNavActivity.k3(BottomNavActivity.this, (ActivityResult) obj);
}
});
private final Lazy H0 = new ViewModelLazy(Reflection.b(com.olxgroup.panamera.app.monetization.myOrder.vm.s.class), new l(this), new k(this), new m(null, this));
private final class a implements View.OnClickListener {
public a() {
}
@Override
public void onClick(View view) {
AppStartupTrackingService n3 = BottomNavActivity.this.n3();
k0.a aVar = k0.a;
n3.locationActionWithGpsStatus("location_start", "yes", "home_bottom", aVar.a(BottomNavActivity.this));
BottomNavActivity.this.n3().locationShowWithGpsStatus("permissions", "home_bottom", aVar.a(BottomNavActivity.this));
BottomNavActivity.this.n3().locationPermissionView("home_bottom");
BottomNavActivity.this.c4();
}
}
public static final class b {
public b(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private b() {
}
}
public static final class c implements x.b {
c() {
}
@Override
public void a(ApiException apiException) {
try {
BottomNavActivity.this.Z3(apiException);
} catch (IntentSender.SendIntentException e) {
l0.a(e);
}
}
}
public static final class d implements com.olx.permify.callback.c {
d() {
}
@Override
public void a(boolean z, List list, List list2) {
m2.a.G2().c().log("POST_NOTIFICATIONS permission status: " + (z ? "Granted" : "Denied"));
}
}
static final class e extends SuspendLambda implements Function2 {
int a;
e(Continuation continuation) {
super(2, continuation);
}
public final Continuation create(Object obj, Continuation continuation) {
return BottomNavActivity.this.new e(continuation);
}
public final Object invokeSuspend(Object obj) {
Object g = IntrinsicsKt.g();
int i = this.a;
if (i == 0) {
ResultKt.b(obj);
com.olxgroup.panamera.app.buyers.home.dialogs.b bVar = BottomNavActivity.this.z0;
if (bVar == null) {
bVar = null;
}
this.a = 1;
if (bVar.l(this) == g) {
return g;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.b(obj);
}
return Unit.a;
}
public final Object invoke(o0 o0Var, Continuation continuation) {
return create(o0Var, continuation).invokeSuspend(Unit.a);
}
}
static final class f extends SuspendLambda implements Function2 {
int a;
f(Continuation continuation) {
super(2, continuation);
}
public final Continuation create(Object obj, Continuation continuation) {
return new f(continuation);
}
public final Object invokeSuspend(Object obj) {
IntrinsicsKt.g();
if (this.a != 0) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.b(obj);
FirebaseInAppMessaging.getInstance().addClickListener(new com.olxgroup.panamera.app.common.services.abtest.b());
return Unit.a;
}
public final Object invoke(o0 o0Var, Continuation continuation) {
return create(o0Var, continuation).invokeSuspend(Unit.a);
}
}
public static final class g implements e.b {
g() {
}
public void a(olx.com.delorean.dialog.locationnudge.e eVar, int i) {
eVar.dismiss();
BottomNavActivity.this.n3().locationActionWithGpsStatus("location_start", "yes", "home_top", k0.a.a(BottomNavActivity.this));
BottomNavActivity.this.l3();
}
}
public static final class h implements e.b {
h() {
}
public void a(olx.com.delorean.dialog.locationnudge.e eVar, int i) {
BottomNavActivity.this.n3().locationActionWithGpsStatus("location_start", "no", "home_top", k0.a.a(BottomNavActivity.this));
eVar.dismiss();
}
}
public static final class i implements e.b {
i() {
}
public void a(olx.com.delorean.dialog.locationnudge.e eVar, int i) {
eVar.dismiss();
BottomNavActivity.this.G3().D0();
}
}
public static final class j implements e.b {
j() {
}
public void a(olx.com.delorean.dialog.locationnudge.e eVar, int i) {
eVar.dismiss();
com.olxgroup.panamera.app.common.helpers.l.g2(true);
BottomNavActivity.this.G0.a(olx.com.delorean.a.I(ShowroomType.TYPE_DRAFT, true));
}
}
public static final class k extends Lambda implements Function0 {
final ComponentActivity d;
public k(ComponentActivity componentActivity) {
super(0);
this.d = componentActivity;
}
public final ViewModelProvider.Factory invoke() {
return this.d.getDefaultViewModelProviderFactory();
}
}
public static final class l extends Lambda implements Function0 {
final ComponentActivity d;
public l(ComponentActivity componentActivity) {
super(0);
this.d = componentActivity;
}
public final ViewModelStore invoke() {
return this.d.getViewModelStore();
}
}
public static final class m extends Lambda implements Function0 {
final Function0 d;
final ComponentActivity e;
public m(Function0 function0, ComponentActivity componentActivity) {
super(0);
this.d = function0;
this.e = componentActivity;
}
public final CreationExtras invoke() {
CreationExtras creationExtras;
Function0 function0 = this.d;
return (function0 == null || (creationExtras = (CreationExtras) function0.invoke()) == null) ? this.e.getDefaultViewModelCreationExtras() : creationExtras;
}
}
public static final class n extends Lambda implements Function0 {
final ComponentActivity d;
public n(ComponentActivity componentActivity) {
super(0);
this.d = componentActivity;
}
public final ViewModelProvider.Factory invoke() {
return this.d.getDefaultViewModelProviderFactory();
}
}
public static final class o extends Lambda implements Function0 {
final ComponentActivity d;
public o(ComponentActivity componentActivity) {
super(0);
this.d = componentActivity;
}
public final ViewModelStore invoke() {
return this.d.getViewModelStore();
}
}
public static final class p extends Lambda implements Function0 {
final Function0 d;
final ComponentActivity e;
public p(Function0 function0, ComponentActivity componentActivity) {
super(0);
this.d = function0;
this.e = componentActivity;
}
public final CreationExtras invoke() {
CreationExtras creationExtras;
Function0 function0 = this.d;
return (function0 == null || (creationExtras = (CreationExtras) function0.invoke()) == null) ? this.e.getDefaultViewModelCreationExtras() : creationExtras;
}
}
public static final class q extends Lambda implements Function0 {
final ComponentActivity d;
public q(ComponentActivity componentActivity) {
super(0);
this.d = componentActivity;
}
public final ViewModelProvider.Factory invoke() {
return this.d.getDefaultViewModelProviderFactory();
}
}
public static final class r extends Lambda implements Function0 {
final ComponentActivity d;
public r(ComponentActivity componentActivity) {
super(0);
this.d = componentActivity;
}
public final ViewModelStore invoke() {
return this.d.getViewModelStore();
}
}
public static final class s extends Lambda implements Function0 {
final Function0 d;
final ComponentActivity e;
public s(Function0 function0, ComponentActivity componentActivity) {
super(0);
this.d = function0;
this.e = componentActivity;
}
public final CreationExtras invoke() {
CreationExtras creationExtras;
Function0 function0 = this.d;
return (function0 == null || (creationExtras = (CreationExtras) function0.invoke()) == null) ? this.e.getDefaultViewModelCreationExtras() : creationExtras;
}
}
public static final class t extends Lambda implements Function0 {
final ComponentActivity d;
public t(ComponentActivity componentActivity) {
super(0);
this.d = componentActivity;
}
public final ViewModelProvider.Factory invoke() {
return this.d.getDefaultViewModelProviderFactory();
}
}
public static final class u extends Lambda implements Function0 {
final ComponentActivity d;
public u(ComponentActivity componentActivity) {
super(0);
this.d = componentActivity;
}
public final ViewModelStore invoke() {
return this.d.getViewModelStore();
}
}
public static final class v extends Lambda implements Function0 {
final Function0 d;
final ComponentActivity e;
public v(Function0 function0, ComponentActivity componentActivity) {
super(0);
this.d = function0;
this.e = componentActivity;
}
public final CreationExtras invoke() {
CreationExtras creationExtras;
Function0 function0 = this.d;
return (function0 == null || (creationExtras = (CreationExtras) function0.invoke()) == null) ? this.e.getDefaultViewModelCreationExtras() : creationExtras;
}
}
private final void A4() {
if (F3().isUserLogged() && l4(F3().getLoggedUser())) {
com.olx.southasia.databinding.c cVar = this.D0;
m1.i((cVar != null ? cVar : null).F, this.c0);
} else {
com.olx.southasia.databinding.c cVar2 = this.D0;
m1.d((cVar2 != null ? cVar2 : null).F, this.c0);
}
}
public final com.olxgroup.panamera.app.buyers.home.viewModels.a G3() {
return (com.olxgroup.panamera.app.buyers.home.viewModels.a) this.A0.getValue();
}
private final void I3(MonetCartStatusResponse.MonetDraftCartData monetDraftCartData) {
Intent d2 = com.olxgroup.panamera.app.seller.monetdraft.a.a.d(monetDraftCartData);
if (d2 == null) {
k1.a(this, getString(com.olx.southasia.p.something_went_wrong));
} else {
startActivity(d2);
}
}
private final void J0(String str) {
Intent intent = new Intent((Context) this, (Class<?>) IntentWidgetActivity.class);
intent.putExtra("category_id", str);
startActivity(intent);
}
private final void J3(Fragment fragment, Function0 function0) {
if (fragment != null) {
o0(function0);
}
}
private final void K3(int i2) {
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
cVar.F.inflateMenu(i2);
com.olx.southasia.databinding.c cVar2 = this.D0;
(cVar2 != null ? cVar2 : null).C.setVisibility(0);
}
private final boolean L3(Activity activity) {
return (activity == null || activity.isDestroyed() || activity.isFinishing()) ? false : true;
}
private final void N3() {
String str;
String str2;
String stringExtra;
Intent intent = getIntent();
String str3 = "";
if (intent == null || (str = intent.getStringExtra("experiment_variant")) == null) {
str = "";
}
Intent intent2 = getIntent();
if (intent2 == null || (str2 = intent2.getStringExtra(Constants.Intent.Extra.SELECT_FROM)) == null) {
str2 = Constants.Source.HOME;
}
Intent intent3 = getIntent();
if (intent3 != null && (stringExtra = intent3.getStringExtra("itemId")) != null) {
str3 = stringExtra;
}
Intent intent4 = getIntent();
M3(ABResultFragment.E1.b(str, str2, str3, intent4 != null ? intent4.getBundleExtra("TRACKING_HELPER") : null), null);
}
private final void O3() {
String str;
Intent intent = getIntent();
if (intent == null || (str = intent.getStringExtra(Constants.Intent.Extra.SELECT_FROM)) == null) {
str = Constants.Source.HOME;
}
Fragment p0 = getSupportFragmentManager().p0(SearchExperienceFragment.class.getName());
if (p0 == null) {
p0 = SearchExperienceFragment.Y5(str);
}
M3(p0, SearchExperienceFragment.class.getCanonicalName());
}
private final void P3() {
if (Build.VERSION.SDK_INT >= 33) {
com.olx.permify.a.a.c(this, CollectionsKt.e("android.permission.POST_NOTIFICATIONS"), (r27 & 4) != 0 ? null : null, (r27 & 8) != 0 ? null : null, (r27 & 16) != 0 ? null : null, (r27 & 32) != 0 ? null : new d(), (r27 & 64) != 0 ? null : null, (r27 & 128) != 0 ? "OLX needs following permissions to continue" : null, (r27 & 256) != 0 ? "Please allow following permissions in settings" : null, (r27 & Transferable.STATUS_UNKNOWN) != 0, (r27 & 1024) != 0 ? false : false);
}
}
private final void Q3() {
if (f3() && h3()) {
if (getSupportFragmentManager().y0() == 1) {
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
int selectedItemId = cVar.F.getSelectedItemId();
com.olx.southasia.databinding.c cVar2 = this.D0;
if (cVar2 == null) {
cVar2 = null;
}
if (selectedItemId != cVar2.F.getMenu().findItem(com.olx.southasia.i.navigation_search).getItemId()) {
getSupportFragmentManager().r1();
com.olx.southasia.databinding.c cVar3 = this.D0;
(cVar3 != null ? cVar3 : null).F.getMenu().findItem(com.olx.southasia.i.navigation_search).setChecked(true);
getIntent().putExtra(Constants.Intent.Extra.SELECT_FROM, Constants.Source.HOME);
O3();
return;
}
}
if (getSupportFragmentManager().y0() <= 1) {
finish();
return;
}
getSupportFragmentManager().o1();
com.olx.southasia.databinding.c cVar4 = this.D0;
(cVar4 != null ? cVar4 : null).F.getMenu().findItem(com.olx.southasia.i.navigation_search).setChecked(true);
getIntent().putExtra(Constants.Intent.Extra.SELECT_FROM, Constants.Source.HOME);
}
}
public static final Unit R3(BottomNavActivity bottomNavActivity) {
bottomNavActivity.Q3();
return Unit.a;
}
public static final void S3(BottomNavActivity bottomNavActivity, View view) {
bottomNavActivity.X3();
}
public static final Unit T3(BottomNavActivity bottomNavActivity, Boolean bool) {
if (bool.booleanValue() && bottomNavActivity.E0 != null && !com.naspers.advertising.baxterandroid.common.g.a.e()) {
com.naspers.advertising.baxterandroid.domain.manager.w wVar = bottomNavActivity.E0;
if (wVar != null) {
com.naspers.advertising.baxterandroid.common.b.d(wVar, bottomNavActivity, "default", true);
}
com.naspers.advertising.baxterandroid.common.g.l();
}
return Unit.a;
}
public static final Unit U3(BottomNavActivity bottomNavActivity) {
bottomNavActivity.x3().q(new Bundle());
return Unit.a;
}
public static final Unit V3(BottomNavActivity bottomNavActivity) {
bottomNavActivity.x3().p(new Bundle());
return Unit.a;
}
public static final Unit W3(BottomNavActivity bottomNavActivity) {
bottomNavActivity.x3().p(new Bundle());
return Unit.a;
}
private final void X3() {
g3();
x3().r();
}
public final void Z3(ApiException apiException) {
((ResolvableApiException) apiException).startResolutionForResult(this, 102);
}
public static final void a4(BottomNavActivity bottomNavActivity) {
bottomNavActivity.startActivity(olx.com.delorean.a.e1());
}
private final void b4(Intent intent) {
String str;
if (intent != null && !intent.hasExtra("nav_action")) {
openHome();
return;
}
String stringExtra = intent != null ? intent.getStringExtra("nav_action") : null;
if (stringExtra != null) {
switch (stringExtra.hashCode()) {
case -309425751:
if (stringExtra.equals("profile")) {
x3().p(new Bundle());
break;
}
break;
case 3052376:
if (stringExtra.equals("chat")) {
Bundle bundleExtra = intent.getBundleExtra("deeplink_params");
if (bundleExtra == null || (str = bundleExtra.getString("inboxFilter")) == null) {
str = "";
}
x3().o(bundleExtra, str, intent);
break;
}
break;
case 3208415:
if (stringExtra.equals(Constants.Source.HOME)) {
openHome();
break;
}
break;
case 100526016:
if (stringExtra.equals("items")) {
x3().q(new Bundle());
break;
}
break;
case 586052842:
if (stringExtra.equals("favourites")) {
Y3();
break;
}
break;
case 2002648914:
if (stringExtra.equals("post_item")) {
openPosting();
break;
}
break;
}
}
if (intent != null) {
intent.getStringExtra("survey_id");
}
r4();
}
public static final Unit d4(BottomNavActivity bottomNavActivity) {
bottomNavActivity.p4();
return Unit.a;
}
public static final Unit e4(BottomNavActivity bottomNavActivity) {
bottomNavActivity.w4();
return Unit.a;
}
private final boolean f3() {
boolean z;
Iterator it = this.d0.iterator();
while (true) {
while (it.hasNext()) {
z = z && ((olx.com.delorean.interfaces.k) it.next()).onBackPressed();
}
return z;
}
}
public static final Unit f4(BottomNavActivity bottomNavActivity) {
bottomNavActivity.s3();
return Unit.a;
}
private final void g3() {
Integer cartId;
getSupportFragmentManager().l0();
DraftMonetBottomSheetDialog p0 = getSupportFragmentManager().p0("DraftMonetBottomSheet");
if (p0 instanceof DraftMonetBottomSheetDialog) {
DraftMonetBottomSheetDialog draftMonetBottomSheetDialog = p0;
draftMonetBottomSheetDialog.dismissAllowingStateLoss();
MonetCartStatusResponse.MonetDraftCartData p5 = draftMonetBottomSheetDialog.p5();
if (p5 == null || (cartId = p5.getCartId()) == null) {
return;
}
int intValue = cartId.intValue();
MonetCartStatusResponse.MonetDraftCartData p52 = draftMonetBottomSheetDialog.p5();
int dismissalCount = p52 != null ? p52.getDismissalCount() : 0;
MonetCartStatusResponse.MonetDraftCartData p53 = draftMonetBottomSheetDialog.p5();
MonetCartStatusResponse.MonetDraftCartData.MonetDraftPageStatus page = p53 != null ? p53.getPage() : null;
MonetCartStatusResponse.MonetDraftCartData p54 = draftMonetBottomSheetDialog.p5();
Integer categoryId = p54 != null ? p54.getCategoryId() : null;
MonetCartStatusResponse.MonetDraftCartData p55 = draftMonetBottomSheetDialog.p5();
Integer subCategoryId = p55 != null ? p55.getSubCategoryId() : null;
MonetCartStatusResponse.MonetDraftCartData p56 = draftMonetBottomSheetDialog.p5();
MonetCartStatusResponse.MonetDraftCartData.MonetDraftCartStatus cartStatus = p56 != null ? p56.getCartStatus() : null;
MonetCartStatusResponse.MonetDraftCartData p57 = draftMonetBottomSheetDialog.p5();
t1(intValue, dismissalCount, page, categoryId, subCategoryId, cartStatus, p57 != null ? p57.getAd() : null);
}
}
private final boolean h3() {
return getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED) && !isFinishing();
}
private final void i3() {
this.u0 = true;
com.olxgroup.panamera.app.common.utils.x.a.b(this, new c());
}
private final void i4() {
String str;
String stringExtra;
Intent intent = getIntent();
if (intent != null) {
boolean z = false;
if (intent.getBooleanExtra("listing_deep_link", false)) {
Intent intent2 = getIntent();
if (intent2 == null || (str = intent2.getStringExtra("category_id")) == null) {
str = "";
}
Intent intent3 = getIntent();
if (intent3 != null && (stringExtra = intent3.getStringExtra("paid_listing")) != null && Boolean.parseBoolean(stringExtra)) {
z = true;
}
m2 m2Var = m2.a;
((ResultsContextRepository) m2Var.A2().getValue()).createSearchExperienceResultsContext();
((ResultsContextRepository) m2Var.A2().getValue()).setPaidListingFilter(z);
((ResultsContextRepository) m2Var.A2().getValue()).setCategoryFilter(((CategorizationRepository) m2Var.I1().getValue()).getCategoryForSearch(str));
}
}
}
private final void j3() {
Tooltip tooltip = this.F0;
if (tooltip != null) {
tooltip.f();
}
}
private final void j4(C2BConfigUIModel c2BConfigUIModel) {
if (G3().B0()) {
olx.com.delorean.view.tooltip.d dVar = olx.com.delorean.view.tooltip.d.a;
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
View findViewById = cVar.F.findViewById(com.olx.southasia.i.navigation_my_account);
com.olx.southasia.databinding.c cVar2 = this.D0;
this.F0 = dVar.h(this, findViewById, (ViewGroup) (cVar2 != null ? cVar2 : null).F.getRootView(), String.valueOf(c2BConfigUIModel.getBuyerProTitle()), new Function0() {
public final Object invoke() {
Unit k4;
k4 = BottomNavActivity.k4();
return k4;
}
});
}
}
public static final void k3(BottomNavActivity bottomNavActivity, ActivityResult activityResult) {
if (activityResult.b() == -1) {
bottomNavActivity.startActivity(olx.com.delorean.a.Z0(bottomNavActivity.F3().getUserIdLogged()));
}
}
public static final Unit k4() {
com.olxgroup.panamera.app.common.helpers.l.Z0(true);
return Unit.a;
}
public final void l3() {
if (!((PermissionService) m2.a.q2().getValue()).hasLocationPermission()) {
F();
} else {
n3().locationShow("gps", "home_top");
i3();
}
}
private final boolean l4(User user) {
if (m3().shouldEnableKyc() && user.getKycStatusAd() != null) {
String value = KycVerificationStatus.VERIFIED.getValue();
KycStatusAd kycStatusAd = user.getKycStatusAd();
if (Intrinsics.d(value, kycStatusAd != null ? kycStatusAd.getStatus() : null)) {
return true;
}
}
return false;
}
private final void m4(DialogInterface.OnClickListener onClickListener, DialogInterface.OnClickListener onClickListener2) {
DialogHelper.c(this, com.olx.southasia.p.permissions_dialog_location_home_title, com.olx.southasia.p.permissions_dialog_location_body).k(onClickListener).i(onClickListener2).c(false).b(false).m();
}
public static final Unit n4(BottomNavActivity bottomNavActivity) {
bottomNavActivity.s3();
return Unit.a;
}
private final com.olxgroup.panamera.app.buyers.home.viewModels.c o3() {
return (com.olxgroup.panamera.app.buyers.home.viewModels.c) this.C0.getValue();
}
public static final Unit o4(BottomNavActivity bottomNavActivity) {
bottomNavActivity.n3().locationPermissionComplete("home_bottom", "Deny");
bottomNavActivity.n3().locationActionWithGpsStatus("permissions", "no", "home_bottom", k0.a.a(bottomNavActivity));
return Unit.a;
}
public static final Unit q4(Function0 function0) {
function0.invoke();
return Unit.a;
}
private final void r4() {
Intent intent = getIntent();
if (intent == null || !intent.getBooleanExtra("shouldShowFeedBackSuccessMessage", false)) {
return;
}
x4(getString(com.olx.southasia.p.label_thanks_for_feedback));
}
private final void s3() {
k0.a aVar = k0.a;
if (aVar.a(this)) {
x3().t();
} else {
n3().locationShowWithGpsStatus("gps", "home_top", aVar.a(this));
i3();
}
}
public static final Unit s4(BottomNavActivity bottomNavActivity) {
bottomNavActivity.s3();
return Unit.a;
}
private final Snackbar t3(View view, String str, int i2) {
int a2 = q1.a(this, 8);
Snackbar make = Snackbar.make(view, str, i2);
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
make.setAnchorView(cVar.F);
make.setTextColor(-1);
make.setBackgroundTint(getResources().getColor(com.olx.southasia.e.snackbar_color));
make.setActionTextColor(getResources().getColor(com.olx.southasia.e.blue));
View view2 = make.getView();
ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) view2.getLayoutParams();
marginLayoutParams.setMargins(marginLayoutParams.leftMargin + a2, marginLayoutParams.topMargin, marginLayoutParams.rightMargin + a2, marginLayoutParams.bottomMargin + a2);
view2.setLayoutParams(marginLayoutParams);
return make;
}
public static final Unit t4(final BottomNavActivity bottomNavActivity) {
bottomNavActivity.m4(new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i2) {
BottomNavActivity.u4(BottomNavActivity.this, dialogInterface, i2);
}
}, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i2) {
BottomNavActivity.v4(BottomNavActivity.this, dialogInterface, i2);
}
});
return Unit.a;
}
private final com.olxgroup.panamera.app.buyers.home.viewModels.g u3() {
return (com.olxgroup.panamera.app.buyers.home.viewModels.g) this.B0.getValue();
}
public static final void u4(BottomNavActivity bottomNavActivity, DialogInterface dialogInterface, int i2) {
bottomNavActivity.startActivity(olx.com.delorean.a.G0());
}
public static final void v4(BottomNavActivity bottomNavActivity, DialogInterface dialogInterface, int i2) {
bottomNavActivity.x4(bottomNavActivity.getString(com.olx.southasia.p.permission_denied_via_nudges_message));
}
private final void x4(String str) {
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
Snackbar t3 = t3(cVar.B, str, 0);
TextView textView = (TextView) t3.getView().findViewById(R.id.snackbar_text);
if (Build.VERSION.SDK_INT >= 23) {
textView.setTextAlignment(4);
} else {
textView.setGravity(1);
}
t3.show();
}
private final void y4() {
if (q3().isC2bEnable() && m3().isC2BEnabled()) {
o3().t0();
o3().s0().observe(this, new com.olxgroup.panamera.app.buyers.home.activities.v(new Function1() {
public final Object invoke(Object obj) {
Unit z4;
z4 = BottomNavActivity.z4(BottomNavActivity.this, (C2BConfigUIModel) obj);
return z4;
}
}));
}
}
public static final Unit z4(BottomNavActivity bottomNavActivity, C2BConfigUIModel c2BConfigUIModel) {
if (c2BConfigUIModel == null) {
return Unit.a;
}
if (bottomNavActivity.F0 != null) {
return Unit.a;
}
bottomNavActivity.j4(c2BConfigUIModel);
return Unit.a;
}
@Override
protected boolean A2() {
return true;
}
public final com.olxgroup.panamera.app.common.services.q A3() {
com.olxgroup.panamera.app.common.services.q qVar = this.e0;
if (qVar != null) {
return qVar;
}
return null;
}
@Override
public com.olxgroup.panamera.app.users.d B0() {
com.olxgroup.panamera.app.users.d dVar = new com.olxgroup.panamera.app.users.d(this, this);
LayoutInflater layoutInflater = getLayoutInflater();
int i2 = com.olx.southasia.k.fraud_warning_dialog;
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
ug ugVar = (ug) androidx.databinding.g.h(layoutInflater, i2, cVar.B, false);
dVar.setContentView(ugVar.getRoot());
dVar.l(ugVar);
n3().trackFraudWarningDialogShown("tns_banner", "home_bottom");
return dVar;
}
public final TrackingContextRepository B3() {
TrackingContextRepository trackingContextRepository = this.n0;
if (trackingContextRepository != null) {
return trackingContextRepository;
}
return null;
}
public final TrackingService C3() {
TrackingService trackingService = this.g0;
if (trackingService != null) {
return trackingService;
}
return null;
}
public final UpdateCountryConfigurationService E3() {
UpdateCountryConfigurationService updateCountryConfigurationService = this.m0;
if (updateCountryConfigurationService != null) {
return updateCountryConfigurationService;
}
return null;
}
@Override
public void F() {
n3().locationShowWithGpsStatus("location_start", "home_bottom", k0.a.a(this));
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
Snackbar t3 = t3(cVar.B, getString(com.olx.southasia.p.location_permission_snackbartext), 60000);
this.x0 = t3;
if (t3 != null) {
t3.setAction(com.olx.southasia.p.allow_snackbar_action_text, new a());
}
Snackbar snackbar = this.x0;
if (snackbar != null) {
snackbar.show();
}
}
@Override
public void F0(boolean z) {
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
cVar.F.setVisibility(z ? 0 : 8);
}
public final UserSessionRepository F3() {
UserSessionRepository userSessionRepository = this.r0;
if (userSessionRepository != null) {
return userSessionRepository;
}
return null;
}
@Override
public void G0() {
x3().n("my_ads");
C3().tapMyAdsInBottomNavigation("bottom_bar");
C3().myAdsViewListed();
M3(new MyPublishedAdsListFragment(), null);
com.olx.southasia.databinding.c cVar = this.D0;
(cVar != null ? cVar : null).F.getMenu().findItem(com.olx.southasia.i.navigation_favorites).setChecked(true);
}
public void I() {
x3().k();
}
@Override
public void K(String str) {
e.a c2 = new e.a(this).d(str).c(com.olx.southasia.k.layout_dealer_showroom_nudge);
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
com.olxgroup.panamera.app.users.dealerShowroom.e a2 = c2.b(cVar.F).e(new i()).f(new j()).a();
this.w0 = a2;
if (a2 != null) {
a2.j(this);
}
}
@Override
public void K0(String str) {
DisableNotificationPopUpFragment.P0.a(str).show(getSupportFragmentManager().s(), "FilterBottomSheetDialog");
}
public final boolean M3(Fragment fragment, String str) {
if (fragment == null || fragment.isVisible()) {
return false;
}
this.U.log(com.naspers.olxautos.shell_common.common.logger.a.INFO, "FRAG_NAV", fragment.getClass().getSimpleName());
androidx.fragment.app.o0 s2 = getSupportFragmentManager().s();
s2.t(com.olx.southasia.i.container, fragment, fragment.getClass().getName());
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
int selectedItemId = cVar.F.getSelectedItemId();
com.olx.southasia.databinding.c cVar2 = this.D0;
if (selectedItemId == (cVar2 != null ? cVar2 : null).F.getMenu().findItem(com.olx.southasia.i.navigation_search).getItemId()) {
s2.g(str);
}
s2.j();
return true;
}
public void T(int i2, int i3, MonetCartStatusResponse.MonetDraftCartData.MonetDraftPageStatus monetDraftPageStatus, Integer num, Integer num2, MonetCartStatusResponse.MonetDraftCartData.MonetDraftCartStatus monetDraftCartStatus, MonetCartStatusResponse.MonetDraftCartData.AdData adData) {
G3().C0(i2, 3, monetDraftPageStatus, num, num2, monetDraftCartStatus, a.EnumC0226a.CLICK_DISMISS, adData);
}
public void U0(String str) {
n3().trackFraudWarningDialogAction("tns_banner", str, "home_bottom");
}
@Override
public void V(String str, Intent intent) {
B3().setOriginReplyFlow("bottom_bar");
r3().setOriginValue(TrackingContextParams.Origin.ReplyFlow.INSTANCE, "bottom_bar");
M3(DeloreanInboxFragment.H6(str, intent), null);
com.olx.southasia.databinding.c cVar = this.D0;
(cVar != null ? cVar : null).F.getMenu().findItem(com.olx.southasia.i.navigation_chat).setChecked(true);
x3().n("chat");
}
public void Y3() {
C3().myAdsViewListed();
M3(MyPublishedAdsListFragment.M5(), MyPublishedAdsListFragment.class.getCanonicalName());
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
cVar.F.getMenu().findItem(com.olx.southasia.i.navigation_favorites).setChecked(true);
}
protected void attachBaseContext(Context context) {
if (m2.a.s1().b()) {
context = com.olxgroup.panamera.app.common.utils.locale.d.a.b().w(context);
}
super.attachBaseContext(context);
}
@Override
public void b1() {
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
final FrameLayout frameLayout = cVar.B;
frameLayout.requestLayout();
ViewTreeObserver viewTreeObserver = frameLayout.getViewTreeObserver();
if (viewTreeObserver != null) {
viewTreeObserver.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
Fragment p0 = BottomNavActivity.this.getSupportFragmentManager().p0(SearchExperienceFragment.class.getName());
if (p0 != null && p0.isVisible()) {
BottomNavActivity.this.x3().m();
}
ViewTreeObserver viewTreeObserver2 = frameLayout.getViewTreeObserver();
if (viewTreeObserver2 != null) {
viewTreeObserver2.removeOnGlobalLayoutListener(this);
}
}
});
}
}
public void c(MonetCartStatusResponse.MonetDraftCartData monetDraftCartData) {
G3().u0(a.EnumC0226a.CLICK_CTA, monetDraftCartData);
I3(monetDraftCartData);
}
public final void c4() {
x0.d(com.olx.permify.a.a, this, CollectionsKt.n(new String[]{"android.permission.ACCESS_FINE_LOCATION", "android.permission.ACCESS_COARSE_LOCATION"}), new Function0() {
public final Object invoke() {
Unit d4;
d4 = BottomNavActivity.d4(BottomNavActivity.this);
return d4;
}
}, null, new Function0() {
public final Object invoke() {
Unit e4;
e4 = BottomNavActivity.e4(BottomNavActivity.this);
return e4;
}
}, new Function0() {
public final Object invoke() {
Unit f4;
f4 = BottomNavActivity.f4(BottomNavActivity.this);
return f4;
}
}, null, null, null, false, 456, null);
}
public void f0(boolean z) {
com.olxgroup.panamera.app.buyers.home.dialogs.b bVar = this.z0;
if (bVar == null) {
bVar = null;
}
bVar.g();
h4(z);
if (!z) {
U0("skip");
}
com.olxgroup.panamera.app.common.helpers.l.q1(System.currentTimeMillis());
}
public void g1(Toolbar toolbar, int i2) {
com.olxgroup.panamera.app.common.utils.c.b(this, toolbar, null, i2, 2, null);
}
public void g4() {
K3(com.olx.southasia.l.menu_bottom_navigation);
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
cVar.F.setOnNavigationItemSelectedListener(this);
com.olx.southasia.databinding.c cVar2 = this.D0;
if (cVar2 == null) {
cVar2 = null;
}
m1.a(cVar2.F, this.b0);
com.olx.southasia.databinding.c cVar3 = this.D0;
if (cVar3 == null) {
cVar3 = null;
}
m1.a(cVar3.F, this.c0);
A4();
com.olx.southasia.databinding.c cVar4 = this.D0;
m1.h((cVar4 != null ? cVar4 : null).F);
}
@Override
public void h1(Bundle bundle) {
setIntent(olx.com.delorean.a.t0(this));
if (bundle != null) {
getIntent().putExtra("deeplink_params", bundle);
}
startActivity(getIntent());
}
public void h4(boolean z) {
x3().l(z);
}
@Override
public olx.com.delorean.dialog.h i1() {
olx.com.delorean.dialog.h hVar = new olx.com.delorean.dialog.h(this, this);
LayoutInflater layoutInflater = getLayoutInflater();
int i2 = com.olx.southasia.k.language_change_dialouge;
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
am amVar = (am) androidx.databinding.g.h(layoutInflater, i2, cVar.B, false);
hVar.setContentView(amVar.getRoot());
hVar.j(amVar);
C3().changeLanguageOptionShown(Constants.Source.HOME);
return hVar;
}
public void j(olx.com.delorean.interfaces.k kVar) {
this.d0.remove(kVar);
}
@Override
public void j0() {
Fragment p0 = getSupportFragmentManager().p0(SearchExperienceFragment.class.getName());
if (p0 != null && (p0 instanceof SearchExperienceFragment)) {
SearchExperienceFragment searchExperienceFragment = (SearchExperienceFragment) p0;
if (searchExperienceFragment.isVisible()) {
searchExperienceFragment.o6();
}
}
x4(getString(com.olx.southasia.p.location_permission_updated));
}
@Override
public void l1(MonetCartStatusResponse.MonetDraftCartData monetDraftCartData) {
DraftMonetBottomSheetDialog a2 = DraftMonetBottomSheetDialog.K0.a(monetDraftCartData, G3().x0());
a2.E5(this);
getSupportFragmentManager().l0();
if (getSupportFragmentManager().p0("DraftMonetBottomSheet") == null) {
getSupportFragmentManager().s().t(com.olx.southasia.i.monet_draft_container, a2, "DraftMonetBottomSheet").j();
}
G3().v0(monetDraftCartData);
}
public final ABTestService m3() {
ABTestService aBTestService = this.p0;
if (aBTestService != null) {
return aBTestService;
}
return null;
}
@Override
public void n0() {
olx.com.delorean.dialog.locationnudge.d dVar = this.v0;
if (dVar != null && dVar.e()) {
dVar.dismiss();
}
Snackbar snackbar = this.x0;
if (snackbar == null || snackbar == null) {
return;
}
snackbar.dismiss();
}
@Override
public void n1() {
startActivity(RateUsActivity.i0.a("open_app"));
}
public final AppStartupTrackingService n3() {
AppStartupTrackingService appStartupTrackingService = this.i0;
if (appStartupTrackingService != null) {
return appStartupTrackingService;
}
return null;
}
@Override
public void o() {
x3().o(new Bundle(), "", new Intent());
}
public void o0(final Function0 function0) {
com.naspers.advertising.baxterandroid.domain.manager.w wVar = this.E0;
if (wVar != null) {
com.naspers.advertising.baxterandroid.common.b.l(wVar, this, "default", true, new Function0() {
public final Object invoke() {
Unit q4;
q4 = BottomNavActivity.q4(function0);
return q4;
}
});
} else {
function0.invoke();
}
}
public void o1(String str) {
n3().trackLanguageUpdated(Constants.Source.HOME, str);
n3().pushLanguageUpdateOnCT(str);
}
@Override
protected void onActivityResult(int i2, int i3, Intent intent) {
if (i2 != 102) {
super.onActivityResult(i2, i3, intent);
} else if (i3 != -1) {
n3().locationActionWithGpsStatus("gps", "no", "home_top", k0.a.a(this));
} else {
n3().locationActionWithGpsStatus("gps", "yes", "home_top", k0.a.a(this));
x3().t();
}
}
@Override
public void onBackPressed() {
Fragment o0 = getSupportFragmentManager().o0(com.olx.southasia.i.container);
if (o0 instanceof ABResultFragment) {
J3(o0, new Function0() {
public final Object invoke() {
Unit R3;
R3 = BottomNavActivity.R3(BottomNavActivity.this);
return R3;
}
});
} else {
Q3();
}
}
@Override
protected void onCreate(Bundle bundle) {
if (bundle != null) {
try {
bundle.remove("android:fragments");
} catch (Exception e2) {
m2.a.G2().c().logException(e2);
}
}
super.onCreate(bundle);
E3().checkAndUpdateCountryConfiguration();
this.D0 = (com.olx.southasia.databinding.c) androidx.databinding.g.j(this, com.olx.southasia.k.activity_bottom_navigation);
g4();
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
cVar.C.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
BottomNavActivity.S3(BottomNavActivity.this, view);
}
});
x3().setView(this);
b4(getIntent());
this.z0 = new com.olxgroup.panamera.app.buyers.home.dialogs.b(this, z3(), m3(), q3(), G3());
if (!getIntent().hasExtra("LANDING_SCREEN")) {
LifecycleOwnerKt.getLifecycleScope(this).launchWhenCreated(new e(null));
}
if (q3().getOlxAutosPhoneInListing() != null && q3().getOlxAutosPhoneInListing().length() > 0) {
com.olxgroup.panamera.app.common.helpers.l.F1(q3().getOlxAutosPhoneInListing());
}
P3();
kotlinx.coroutines.i.d(LifecycleOwnerKt.getLifecycleScope(this), p3().getIo(), (q0) null, new f(null), 2, (Object) null);
com.naspers.advertising.baxterandroid.domain.manager.w a2 = new w.a(this, getLifecycle(), "default", MapsKt.i(), (String) null, 16, (DefaultConstructorMarker) null).a();
this.E0 = a2;
if (a2 != null) {
com.naspers.advertising.baxterandroid.common.b.i(a2, this, "default");
}
com.naspers.advertising.baxterandroid.common.g.a.f().observe(this, new com.olxgroup.panamera.app.buyers.home.activities.v(new Function1() {
public final Object invoke(Object obj) {
Unit T3;
T3 = BottomNavActivity.T3(BottomNavActivity.this, (Boolean) obj);
return T3;
}
}));
u3().r0();
}
@Override
protected void onDestroy() {
com.naspers.advertising.baxterandroid.common.g.a.f().removeObservers(this);
x3().onDestroy();
super.onDestroy();
}
public boolean onNavigationItemSelected(MenuItem menuItem) {
g3();
j3();
int itemId = menuItem.getItemId();
if (itemId == com.olx.southasia.i.navigation_search) {
getIntent().removeExtra(Constants.Intent.Extra.SELECT_FROM);
C3().tapExploreInBottomNavigation("bottom_bar");
x3().s();
return true;
}
if (itemId == com.olx.southasia.i.navigation_favorites) {
Fragment o0 = getSupportFragmentManager().o0(com.olx.southasia.i.container);
if (o0 instanceof SearchExperienceFragment) {
J3(o0, new Function0() {
public final Object invoke() {
Unit U3;
U3 = BottomNavActivity.U3(BottomNavActivity.this);
return U3;
}
});
} else {
x3().q(new Bundle());
}
return false;
}
if (itemId == com.olx.southasia.i.navigation_sell_active) {
X3();
return false;
}
if (itemId == com.olx.southasia.i.navigation_chat) {
x3().o(new Bundle(), "", new Intent());
return false;
}
if (itemId != com.olx.southasia.i.navigation_my_account) {
return true;
}
Fragment o02 = getSupportFragmentManager().o0(com.olx.southasia.i.container);
if (o02 instanceof SearchExperienceFragment) {
J3(o02, new Function0() {
public final Object invoke() {
Unit V3;
V3 = BottomNavActivity.V3(BottomNavActivity.this);
return V3;
}
});
} else if (o02 instanceof ABResultFragment) {
J3(o02, new Function0() {
public final Object invoke() {
Unit W3;
W3 = BottomNavActivity.W3(BottomNavActivity.this);
return W3;
}
});
} else {
x3().p(new Bundle());
}
return false;
}
protected void onNewIntent(Intent intent) {
super/*androidx.activity.ComponentActivity*/.onNewIntent(intent);
b4(intent);
}
@Override
protected void onPause() {
x3().stop();
super.onPause();
}
public void onRequestPermissionsResult(int i2, String[] strArr, int[] iArr) {
super/*androidx.fragment.app.r*/.onRequestPermissionsResult(i2, strArr, iArr);
if ((!(iArr.length == 0)) && iArr[0] == 0) {
n3().locationPermissionCompleteUsingApp("home_bottom", "While Using the app");
n3().locationActionWithGpsStatus("permissions", "yes", "home_bottom", k0.a.a(this));
}
}
@Override
protected void onResume() {
super.onResume();
x3().start();
com.olxgroup.panamera.app.buyers.home.dialogs.b bVar = this.z0;
if (bVar == null) {
bVar = null;
}
bVar.m();
x3().g();
if (this.u0 && k0.a.a(this) && Build.VERSION.SDK_INT > 28) {
x3().t();
this.u0 = false;
}
A4();
v3().A0();
y4();
}
@Override
public void openHome() {
f3();
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
cVar.F.getMenu().findItem(com.olx.southasia.i.navigation_search).setChecked(true);
int y0 = getSupportFragmentManager().y0();
if (y0 != 0) {
if (y0 <= 1) {
O3();
return;
} else if (y0 <= 2 || !Intrinsics.d(getSupportFragmentManager().x0(y0 - 2).getName(), CxeLandingFragment.class.getCanonicalName())) {
getSupportFragmentManager().o1();
return;
} else {
getSupportFragmentManager().q1(SearchExperienceFragment.class.getCanonicalName(), 0);
return;
}
}
if (!getIntent().hasExtra("search_deep_link")) {
O3();
return;
}
i4();
if (getIntent().hasExtra("open_cxe_landing_screen")) {
O3();
M3(CxeLandingFragment.R0.a(), CxeLandingFragment.class.getCanonicalName());
return;
}
if (getIntent().hasExtra("LANDING_SCREEN")) {
O3();
M3(CxeLandingFragment.R0.a(), CxeLandingFragment.class.getCanonicalName());
N3();
} else if (!getIntent().hasExtra("open_intent_widget_screen")) {
O3();
N3();
} else {
O3();
M3(CxeLandingFragment.R0.a(), CxeLandingFragment.class.getCanonicalName());
J0(getIntent().getStringExtra("category_id"));
}
}
@Override
public void openPosting() {
B3().setOriginPostingFlow("bottom_bar");
w3().setOriginPostingFlow("bottom_bar");
String uuid = UUID.randomUUID().toString();
C3().postingTapPost(uuid);
w3().postingTapPost(uuid);
A3().f(this, null, new q.c() {
@Override
public final void a() {
BottomNavActivity.a4(BottomNavActivity.this);
}
});
}
@Override
public void openWebView(String str) {
startActivity(olx.com.delorean.a.T(str));
}
public final DispatcherProvider p3() {
DispatcherProvider dispatcherProvider = this.t0;
if (dispatcherProvider != null) {
return dispatcherProvider;
}
return null;
}
public final void p4() {
new k0().a(this, new Function0() {
public final Object invoke() {
Unit n4;
n4 = BottomNavActivity.n4(BottomNavActivity.this);
return n4;
}
}, new Function0() {
public final Object invoke() {
Unit o4;
o4 = BottomNavActivity.o4(BottomNavActivity.this);
return o4;
}
});
}
public void q0(olx.com.delorean.interfaces.k kVar) {
this.d0.add(kVar);
}
public final FeatureToggleDeviceStorage q3() {
FeatureToggleDeviceStorage featureToggleDeviceStorage = this.q0;
if (featureToggleDeviceStorage != null) {
return featureToggleDeviceStorage;
}
return null;
}
@Override
public void r1() {
A4();
}
public final ListingsTrackingService r3() {
ListingsTrackingService listingsTrackingService = this.j0;
if (listingsTrackingService != null) {
return listingsTrackingService;
}
return null;
}
public void t1(int i2, int i3, MonetCartStatusResponse.MonetDraftCartData.MonetDraftPageStatus monetDraftPageStatus, Integer num, Integer num2, MonetCartStatusResponse.MonetDraftCartData.MonetDraftCartStatus monetDraftCartStatus, MonetCartStatusResponse.MonetDraftCartData.AdData adData) {
G3().C0(i2, i3 + 1, monetDraftPageStatus, num, num2, monetDraftCartStatus, a.EnumC0226a.CLICK_OUTSIDE, adData);
}
@Override
public void u() {
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
int selectedItemId = cVar.F.getSelectedItemId();
com.olx.southasia.databinding.c cVar2 = this.D0;
if (cVar2 == null) {
cVar2 = null;
}
if (selectedItemId != cVar2.F.getMenu().findItem(com.olx.southasia.i.navigation_my_account).getItemId()) {
y3().myAccountShow();
M3(new MyAccountFragment(), null);
com.olx.southasia.databinding.c cVar3 = this.D0;
(cVar3 != null ? cVar3 : null).F.getMenu().findItem(com.olx.southasia.i.navigation_my_account).setChecked(true);
}
}
@Override
public void v1() {
olx.com.delorean.dialog.locationnudge.d dVar;
n3().locationShowWithGpsStatus("location_start", "home_top", k0.a.a(this));
d.a d2 = new d.a(this).i(com.olx.southasia.p.homescreen_nudge_device_location_off).f(com.olx.southasia.p.homescreen_nudge_description).c(com.olx.southasia.k.layout_location_nudge).d(17);
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
this.v0 = d2.b(cVar.A).e(getResources().getDisplayMetrics().heightPixels).h(com.olx.southasia.p.homescreen_nudge_cta_text, new g()).g(com.olx.southasia.g.ic_close, new h()).a();
if (!L3(this) || (dVar = this.v0) == null) {
return;
}
dVar.j();
}
public final com.olxgroup.panamera.app.monetization.myOrder.vm.s v3() {
return (com.olxgroup.panamera.app.monetization.myOrder.vm.s) this.H0.getValue();
}
public final PlatformTrackingService w3() {
PlatformTrackingService platformTrackingService = this.k0;
if (platformTrackingService != null) {
return platformTrackingService;
}
return null;
}
public final void w4() {
new k0().a(this, new Function0() {
public final Object invoke() {
Unit s4;
s4 = BottomNavActivity.s4(BottomNavActivity.this);
return s4;
}
}, new Function0() {
public final Object invoke() {
Unit t4;
t4 = BottomNavActivity.t4(BottomNavActivity.this);
return t4;
}
});
}
public final com.olxgroup.panamera.app.buyers.home.presenters.a x3() {
com.olxgroup.panamera.app.buyers.home.presenters.a aVar = this.f0;
if (aVar != null) {
return aVar;
}
return null;
}
@Override
public void y1(int i2) {
com.olx.southasia.databinding.c cVar = this.D0;
if (cVar == null) {
cVar = null;
}
m1.g(cVar.F, this.b0, i2);
}
public final ProfileTrackingService y3() {
ProfileTrackingService profileTrackingService = this.h0;
if (profileTrackingService != null) {
return profileTrackingService;
}
return null;
}
public final RateUsService z3() {
RateUsService rateUsService = this.l0;
if (rateUsService != null) {
return rateUsService;
}
return null;
}
}