正在查看: OLX India v19.42.007 应用的 C2BPaymentSuccessScreen.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: OLX India v19.42.007 应用的 C2BPaymentSuccessScreen.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.olxgroup.panamera.app.buyers.c2b;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import androidx.activity.ComponentActivity;
import androidx.activity.d0;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
import com.olx.southasia.p;
import com.olxgroup.panamera.app.buyers.c2b.viewModel.t;
import com.olxgroup.panamera.app.common.utils.f0;
import com.olxgroup.panamera.app.common.utils.v;
import com.olxgroup.panamera.domain.buyers.c2b.entities.C2BConfigUIModel;
import kotlin.Function;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.FunctionAdapter;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import kotlin.jvm.internal.Reflection;
import kotlin.jvm.internal.SourceDebugExtension;
import olx.com.delorean.domain.utils.EventWrapper;
import olx.com.delorean.view.notificationCenter.deeplink.DeepLinkActivity;
@Metadata
@SourceDebugExtension
public final class C2BPaymentSuccessScreen extends l {
public static final a d0 = new a(null);
public static final int e0 = 8;
private com.olx.southasia.databinding.g a0;
private final Lazy b0 = LazyKt.b(new Function0() {
public final Object invoke() {
Integer J2;
J2 = C2BPaymentSuccessScreen.J2(C2BPaymentSuccessScreen.this);
return J2;
}
});
private final Lazy c0 = new ViewModelLazy(Reflection.b(t.class), new d(this), new c(this), new e(null, this));
public static final class a {
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private a() {
}
}
static final class b implements Observer, FunctionAdapter {
private final Function1 a;
b(Function1 function1) {
this.a = function1;
}
public final boolean equals(Object obj) {
if ((obj instanceof Observer) && (obj instanceof FunctionAdapter)) {
return Intrinsics.d(getFunctionDelegate(), ((FunctionAdapter) obj).getFunctionDelegate());
}
return false;
}
public final Function getFunctionDelegate() {
return this.a;
}
public final int hashCode() {
return getFunctionDelegate().hashCode();
}
public final void onChanged(Object obj) {
this.a.invoke(obj);
}
}
public static final class c extends Lambda implements Function0 {
final ComponentActivity d;
public c(ComponentActivity componentActivity) {
super(0);
this.d = componentActivity;
}
public final ViewModelProvider.Factory invoke() {
return this.d.getDefaultViewModelProviderFactory();
}
}
public static final class d extends Lambda implements Function0 {
final ComponentActivity d;
public d(ComponentActivity componentActivity) {
super(0);
this.d = componentActivity;
}
public final ViewModelStore invoke() {
return this.d.getViewModelStore();
}
}
public static final class e extends Lambda implements Function0 {
final Function0 d;
final ComponentActivity e;
public e(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 Integer J2(C2BPaymentSuccessScreen c2BPaymentSuccessScreen) {
Intent intent = c2BPaymentSuccessScreen.getIntent();
if (intent == null) {
return null;
}
Integer valueOf = Integer.valueOf(intent.getIntExtra("extra_category_id", -1));
if (valueOf.intValue() != -1) {
return valueOf;
}
return null;
}
private final Integer K2() {
return (Integer) this.b0.getValue();
}
private final t L2() {
return (t) this.c0.getValue();
}
private final void M2(String str) {
if (Intrinsics.d(str, "buyer_pro")) {
startActivity(DeepLinkActivity.p2("https://www.olx.in/c2b_dashboard"));
} else if (Intrinsics.d(str, "elite_buyer")) {
startActivity(DeepLinkActivity.p2("https://www.olx.in/listings?categoryId=" + K2()));
} else {
startActivity(olx.com.delorean.a.Z());
}
finish();
}
private final void N2() {
L2().x0().observe(this, new b(new Function1() {
public final Object invoke(Object obj) {
Unit O2;
O2 = C2BPaymentSuccessScreen.O2(C2BPaymentSuccessScreen.this, (EventWrapper) obj);
return O2;
}
}));
}
public static final Unit O2(C2BPaymentSuccessScreen c2BPaymentSuccessScreen, EventWrapper eventWrapper) {
t.b bVar = (t.b) eventWrapper.getContentIfNotHandled();
if (bVar == null) {
return Unit.a;
}
if (bVar instanceof t.b.C0177b) {
c2BPaymentSuccessScreen.P2(((t.b.C0177b) bVar).a());
} else if (bVar instanceof t.b.a) {
c2BPaymentSuccessScreen.P2("");
} else {
if (!(bVar instanceof t.b.c)) {
throw new NoWhenBranchMatchedException();
}
c2BPaymentSuccessScreen.R2(((t.b.c) bVar).a());
}
return Unit.a;
}
private final void P2(final String str) {
com.olx.southasia.databinding.g gVar = this.a0;
if (gVar == null) {
gVar = null;
}
v.c(gVar.D, false);
com.olx.southasia.databinding.g gVar2 = this.a0;
if (gVar2 == null) {
gVar2 = null;
}
gVar2.A.setEnabled(true);
com.olx.southasia.databinding.g gVar3 = this.a0;
if (gVar3 == null) {
gVar3 = null;
}
gVar3.A.setText(getResources().getString(p.c2b_explore_now));
com.olx.southasia.databinding.g gVar4 = this.a0;
(gVar4 != null ? gVar4 : null).A.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
C2BPaymentSuccessScreen.Q2(C2BPaymentSuccessScreen.this, str, view);
}
});
}
public static final void Q2(C2BPaymentSuccessScreen c2BPaymentSuccessScreen, String str, View view) {
c2BPaymentSuccessScreen.M2(str);
}
private final void R2(C2BConfigUIModel c2BConfigUIModel) {
String dashboardHeaderIcon = c2BConfigUIModel.getDashboardHeaderIcon();
if (dashboardHeaderIcon != null) {
com.olxgroup.panamera.app.common.repository.b d2 = com.olxgroup.panamera.app.common.repositoryImpl.e.a.d();
com.olx.southasia.databinding.g gVar = this.a0;
if (gVar == null) {
gVar = null;
}
d2.g(dashboardHeaderIcon, gVar.B, f0.p());
}
com.olx.southasia.databinding.g gVar2 = this.a0;
if (gVar2 == null) {
gVar2 = null;
}
gVar2.F.setText(getString(p.c2b_congratulations_package, c2BConfigUIModel.getEliteBuyerTitle()));
com.olx.southasia.databinding.g gVar3 = this.a0;
if (gVar3 == null) {
gVar3 = null;
}
gVar3.A.setText("");
com.olx.southasia.databinding.g gVar4 = this.a0;
v.c((gVar4 != null ? gVar4 : null).D, true);
}
@Override
public void onBackPressed() {
super.onBackPressed();
M2("");
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
androidx.activity.l.b(this, (d0) null, (d0) null, 3, (Object) null);
L2().y0(t.a.C0176a.a);
this.a0 = (com.olx.southasia.databinding.g) androidx.databinding.g.j(this, com.olx.southasia.k.activity_c2b_payment_success_screen);
N2();
L2().y0(t.a.b.a);
}
}