得物.apk(点击下载) / MyOwnSkuCardFragment.java
package com.shizhuang.duapp.modules.product_detail.own.ui;
import a.f;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Bundle;
import android.util.ArrayMap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.LinearInterpolator;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentViewModelLazyKt;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.LiveData;
import androidx.recyclerview.widget.LinearSnapHelper;
import cd.i;
import com.knightboost.weaver.api.Scope;
import com.knightboost.weaver.api.annotations.Insert;
import com.knightboost.weaver.api.annotations.TargetClass;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.component.module.NormalModuleAdapter;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.common.helper.loadmore.LoadMoreHelper;
import com.shizhuang.duapp.common.ui.BaseFragment;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuRequestOptions;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuScaleType;
import com.shizhuang.duapp.modules.du_mall_common.annotations.IsNotNetModel;
import com.shizhuang.duapp.modules.du_mall_common.api.LoadResultKt;
import com.shizhuang.duapp.modules.du_mall_common.constant.MallABTest;
import com.shizhuang.duapp.modules.du_mall_common.extension.LifecycleExtensionKt;
import com.shizhuang.duapp.modules.du_mall_common.extension.LiveDataExtensionKt;
import com.shizhuang.duapp.modules.du_mall_common.utils.exposure.IMallExposureHelper;
import com.shizhuang.duapp.modules.du_mall_common.utils.exposure.MallModuleExposureHelper;
import com.shizhuang.duapp.modules.du_mall_common.widget.MLimitIndicator;
import com.shizhuang.duapp.modules.product_detail.api.ProductFacadeV2;
import com.shizhuang.duapp.modules.product_detail.exown.widget.ExOwnSkuCardShareView;
import com.shizhuang.duapp.modules.product_detail.exown.widget.ExOwnSkuCardShareViewNew;
import com.shizhuang.duapp.modules.product_detail.own.callback.MyOwnEditorEmotionCallBack;
import com.shizhuang.duapp.modules.product_detail.own.dialog.OwnDelKeepDialog;
import com.shizhuang.duapp.modules.product_detail.own.model.MyOwnGiverInfo;
import com.shizhuang.duapp.modules.product_detail.own.model.MyOwnOrderModel;
import com.shizhuang.duapp.modules.product_detail.own.model.MyOwnSkuCardItemModel;
import com.shizhuang.duapp.modules.product_detail.own.model.MyOwnSkuListItemModel;
import com.shizhuang.duapp.modules.product_detail.own.model.MyOwnSpuItemModel;
import com.shizhuang.duapp.modules.product_detail.own.model.OwnCardAnimDismissEvent;
import com.shizhuang.duapp.modules.product_detail.own.p005interface.MyOwnCommentCallBack;
import com.shizhuang.duapp.modules.product_detail.own.p005interface.MyOwnSkuCardItemOperateCallBack;
import com.shizhuang.duapp.modules.product_detail.own.ui.MyOwnActivity;
import com.shizhuang.duapp.modules.product_detail.own.ui.MyOwnSkuCardFragment$shareChannelExposureHelper$2;
import com.shizhuang.duapp.modules.product_detail.own.vm.MyOwnViewModel;
import com.shizhuang.duapp.modules.product_detail.own.widget.InterceptConstraintLayout;
import com.shizhuang.duapp.modules.product_detail.own.widget.NoScrollLinearLayoutManager;
import com.shizhuang.duapp.modules.product_detail.own.widget.OwnListScaleItemDecoration;
import com.shizhuang.duapp.modules.product_detail.own.widget.SlowFlingRecyclerView;
import com.shizhuang.duapp.modules.router.ServiceManager;
import com.shizhuang.duapp.modules.share.constance.SHARE_MEDIA;
import com.shizhuang.model.event.MessageEvent;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CancellationException;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__CollectionsJVMKt;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlin.properties.ReadWriteProperty;
import kotlin.reflect.KProperty;
import kotlinx.coroutines.Job;
import kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1;
import n21.d;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.annotations.NotNull;
import pb1.k;
import qf.l;
@Metadata(bv = {}, d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0006\u0018\u00002\u00020\u0001:\u0001\tB\u0007¢\u0006\u0004\b\u0007\u0010\bJ\u0012\u0010\u0005\u001a\u00020\u00042\b\b\u0001\u0010\u0003\u001a\u00020\u0002H\u0007J\b\u0010\u0006\u001a\u00020\u0004H\u0016¨\u0006\n"}, d2 = {"Lcom/shizhuang/duapp/modules/product_detail/own/ui/MyOwnSkuCardFragment;", "Lcom/shizhuang/duapp/common/ui/BaseFragment;", "Lcom/shizhuang/model/event/MessageEvent;", "event", "", "onMessageReceived", "onResume", "<init>", "()V", "a", "du_product_detail_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: MyOwnSkuCardFragment.kt */
public final class MyOwnSkuCardFragment extends BaseFragment {
public static final /* synthetic */ KProperty[] D = {g.a.o(MyOwnSkuCardFragment.class, "hasShowDeleteGuide", "getHasShowDeleteGuide()Z", 0)};
public static ChangeQuickRedirect changeQuickRedirect;
public AnimatorSet A;
public AnimatorSet B;
public HashMap C;
public final Lazy b = LazyKt__LazyJVMKt.lazy(MyOwnSkuCardFragment$ownListCardHasShowAnim$2.INSTANCE);
/* renamed from: c reason: collision with root package name */
public final Lazy f22826c = LazyKt__LazyJVMKt.lazy(MyOwnSkuCardFragment$ownListGiverGiftTips$2.INSTANCE);
public final NormalModuleAdapter d = new NormalModuleAdapter(false, 1);
public final Lazy e = FragmentViewModelLazyKt.createViewModelLazy(this, Reflection.getOrCreateKotlinClass(MyOwnViewModel.class), new MyOwnSkuCardFragment$$special$$inlined$activityViewModels$1(this), new MyOwnSkuCardFragment$$special$$inlined$activityViewModels$2(this));
public LoadMoreHelper f;
/* renamed from: g reason: collision with root package name */
public Job f22827g;
/* renamed from: h reason: collision with root package name */
public Job f22828h;
public final ReadWriteProperty i;
public final Lazy j;
public final q60.c k;
public final NoScrollLinearLayoutManager l;
public MyOwnSkuListItemModel m;
public final boolean n;
public Function2<? super String, ? super MyOwnSkuListItemModel, Unit> o;
public final Lazy p;
/* renamed from: q reason: collision with root package name */
public ExOwnSkuCardShareView f22829q;
public ExOwnSkuCardShareViewNew r;
public boolean s;
public final k t;
/* renamed from: u reason: collision with root package name */
public final List<String> f22830u;
/* renamed from: v reason: collision with root package name */
public b f22831v;
public final c w;
public boolean x;
public boolean y;
public l z;
public class _boostWeave {
public static ChangeQuickRedirect changeQuickRedirect;
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreate")
@Keep
public static void FragmentMethodWeaver_onCreate(MyOwnSkuCardFragment myOwnSkuCardFragment, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardFragment, bundle}, null, changeQuickRedirect, true, 280528, new Class[]{MyOwnSkuCardFragment.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
MyOwnSkuCardFragment.c(myOwnSkuCardFragment, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (myOwnSkuCardFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.product_detail.own.ui.MyOwnSkuCardFragment")) {
jn.b.f34396a.fragmentOnCreateMethod(myOwnSkuCardFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreateView")
@Keep
public static View FragmentMethodWeaver_onCreateView(@NonNull MyOwnSkuCardFragment myOwnSkuCardFragment, @Nullable LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{myOwnSkuCardFragment, layoutInflater, viewGroup, bundle}, null, changeQuickRedirect, true, 280531, new Class[]{MyOwnSkuCardFragment.class, LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
long currentTimeMillis = System.currentTimeMillis();
View f = MyOwnSkuCardFragment.f(myOwnSkuCardFragment, layoutInflater, viewGroup, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (myOwnSkuCardFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.product_detail.own.ui.MyOwnSkuCardFragment")) {
jn.b.f34396a.fragmentOnCreateViewMethod(myOwnSkuCardFragment, currentTimeMillis, currentTimeMillis2);
}
return f;
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onResume")
@Keep
public static void FragmentMethodWeaver_onResume(MyOwnSkuCardFragment myOwnSkuCardFragment) {
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardFragment}, null, changeQuickRedirect, true, 280529, new Class[]{MyOwnSkuCardFragment.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
MyOwnSkuCardFragment.d(myOwnSkuCardFragment);
long currentTimeMillis2 = System.currentTimeMillis();
if (myOwnSkuCardFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.product_detail.own.ui.MyOwnSkuCardFragment")) {
jn.b.f34396a.fragmentOnResumeMethod(myOwnSkuCardFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onStart")
@Keep
public static void FragmentMethodWeaver_onStart(MyOwnSkuCardFragment myOwnSkuCardFragment) {
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardFragment}, null, changeQuickRedirect, true, 280530, new Class[]{MyOwnSkuCardFragment.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
MyOwnSkuCardFragment.e(myOwnSkuCardFragment);
long currentTimeMillis2 = System.currentTimeMillis();
if (myOwnSkuCardFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.product_detail.own.ui.MyOwnSkuCardFragment")) {
jn.b.f34396a.fragmentOnStartMethod(myOwnSkuCardFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onViewCreated")
@Keep
public static void FragmentMethodWeaver_onViewCreated(@NonNull MyOwnSkuCardFragment myOwnSkuCardFragment, @Nullable View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardFragment, view, bundle}, null, changeQuickRedirect, true, 280532, new Class[]{MyOwnSkuCardFragment.class, View.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
MyOwnSkuCardFragment.g(myOwnSkuCardFragment, view, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (myOwnSkuCardFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.product_detail.own.ui.MyOwnSkuCardFragment")) {
jn.b.f34396a.fragmentOnViewCreatedMethod(myOwnSkuCardFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
}
@SuppressLint({"MallNetModelCheck"})
@IsNotNetModel
/* compiled from: MyOwnSkuCardFragment.kt */
public static final class a {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final int f22832a;
@org.jetbrains.annotations.Nullable
public final Integer b;
@org.jetbrains.annotations.Nullable
/* renamed from: c reason: collision with root package name */
public final String f22833c;
@org.jetbrains.annotations.Nullable
public final Object d;
public a(int i, @org.jetbrains.annotations.Nullable Integer num, @org.jetbrains.annotations.Nullable String str, @org.jetbrains.annotations.Nullable Object obj) {
this.f22832a = i;
this.b = num;
this.f22833c = str;
this.d = obj;
}
public boolean equals(@org.jetbrains.annotations.Nullable Object obj) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{obj}, this, changeQuickRedirect, false, 280527, new Class[]{Object.class}, Boolean.TYPE);
if (proxy.isSupported) {
return ((Boolean) proxy.result).booleanValue();
}
if (this != obj) {
if (obj instanceof a) {
a aVar = (a) obj;
if (this.f22832a != aVar.f22832a || !Intrinsics.areEqual(this.b, aVar.b) || !Intrinsics.areEqual(this.f22833c, aVar.f22833c) || !Intrinsics.areEqual(this.d, aVar.d)) {
return false;
}
}
return false;
}
return true;
}
public int hashCode() {
int i = 0;
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280526, new Class[0], Integer.TYPE);
if (proxy.isSupported) {
return ((Integer) proxy.result).intValue();
}
int i3 = this.f22832a * 31;
Integer num = this.b;
int hashCode = (i3 + (num != null ? num.hashCode() : 0)) * 31;
String str = this.f22833c;
int hashCode2 = (hashCode + (str != null ? str.hashCode() : 0)) * 31;
Object obj = this.d;
if (obj != null) {
i = obj.hashCode();
}
return hashCode2 + i;
}
@NotNull
public String toString() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280525, new Class[0], String.class);
if (proxy.isSupported) {
return (String) proxy.result;
}
StringBuilder h12 = f.h("ExpDataModel(index=");
h12.append(this.f22832a);
h12.append(", honorType=");
h12.append(this.b);
h12.append(", honorTitle=");
h12.append(this.f22833c);
h12.append(", desc=");
return fd0.c.n(h12, this.d, ")");
}
public a(int i, Integer num, String str, Object obj, int i3) {
num = (i3 & 2) != 0 ? null : num;
str = (i3 & 4) != 0 ? null : str;
this.f22832a = i;
this.b = num;
this.f22833c = str;
this.d = null;
}
}
/* compiled from: MyOwnSkuCardFragment.kt */
public static final class b implements MyOwnCommentCallBack {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ MyOwnSkuCardFragment f22834a;
/* JADX WARN: Incorrect args count in method signature: ()V */
public b(MyOwnSkuCardFragment myOwnSkuCardFragment) {
this.f22834a = myOwnSkuCardFragment;
}
@Override // com.shizhuang.duapp.modules.product_detail.own.p005interface.MyOwnCommentCallBack
public void sendEditorMessage(@NotNull String str, @NotNull MyOwnSkuListItemModel myOwnSkuListItemModel) {
Function2<? super String, ? super MyOwnSkuListItemModel, Unit> function2;
if (!PatchProxy.proxy(new Object[]{str, myOwnSkuListItemModel}, this, changeQuickRedirect, false, 280543, new Class[]{String.class, MyOwnSkuListItemModel.class}, Void.TYPE).isSupported && (function2 = this.f22834a.o) != null) {
function2.invoke(str, myOwnSkuListItemModel);
}
}
}
/* compiled from: MyOwnSkuCardFragment.kt */
public static final class c implements MyOwnSkuCardItemOperateCallBack {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ MyOwnSkuCardFragment f22835a;
/* compiled from: MyOwnSkuCardFragment.kt */
public static final class a implements OwnDelKeepDialog.CallBack {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ c f22836a;
public final /* synthetic */ MyOwnSkuCardItemModel b;
public a(c cVar, MyOwnSkuCardItemModel myOwnSkuCardItemModel) {
this.f22836a = cVar;
this.b = myOwnSkuCardItemModel;
}
@Override // com.shizhuang.duapp.modules.product_detail.own.dialog.OwnDelKeepDialog.CallBack
@NotNull
public String getContentString() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280587, new Class[0], String.class);
return proxy.isSupported ? (String) proxy.result : OwnDelKeepDialog.CallBack.a.a(this);
}
@Override // com.shizhuang.duapp.modules.product_detail.own.dialog.OwnDelKeepDialog.CallBack
public void onCancelClick() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280585, new Class[0], Void.TYPE).isSupported) {
this.f22836a.f22835a.m();
}
}
@Override // com.shizhuang.duapp.modules.product_detail.own.dialog.OwnDelKeepDialog.CallBack
public void onConfirmClick() {
MyOwnSkuListItemModel sku;
String rowKey;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280584, new Class[0], Void.TYPE).isSupported) {
MyOwnViewModel k = this.f22836a.f22835a.k();
MyOwnSkuCardItemModel myOwnSkuCardItemModel = this.b;
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel}, k, MyOwnViewModel.changeQuickRedirect, false, 280911, new Class[]{MyOwnSkuCardItemModel.class}, Void.TYPE).isSupported && (sku = myOwnSkuCardItemModel.getSku()) != null && (rowKey = sku.getRowKey()) != null) {
ProductFacadeV2.f21736a.b0(CollectionsKt__CollectionsJVMKt.listOf(rowKey), new d(k, myOwnSkuCardItemModel, k));
}
}
}
@Override // com.shizhuang.duapp.modules.product_detail.own.dialog.OwnDelKeepDialog.CallBack
public void onResume() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280586, new Class[0], Void.TYPE).isSupported) {
OwnDelKeepDialog.CallBack.a.b(this);
}
}
}
/* JADX WARN: Incorrect args count in method signature: ()V */
public c(MyOwnSkuCardFragment myOwnSkuCardFragment) {
this.f22835a = myOwnSkuCardFragment;
}
@Override // com.shizhuang.duapp.modules.product_detail.own.p005interface.MyOwnSkuCardItemOperateCallBack
public void onCancelLongClick(@NotNull MyOwnSkuCardItemModel myOwnSkuCardItemModel, int i) {
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel, new Integer(i)}, this, changeQuickRedirect, false, 280582, new Class[]{MyOwnSkuCardItemModel.class, Integer.TYPE}, Void.TYPE).isSupported) {
MyOwnSkuCardFragment myOwnSkuCardFragment = this.f22835a;
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel}, myOwnSkuCardFragment, MyOwnSkuCardFragment.changeQuickRedirect, false, 280499, new Class[]{MyOwnSkuCardItemModel.class}, Void.TYPE).isSupported) {
int i3 = 0;
for (T t : myOwnSkuCardFragment.d.getItems()) {
int i12 = i3 + 1;
if (i3 < 0) {
CollectionsKt__CollectionsKt.throwIndexOverflow();
}
if (t instanceof MyOwnSkuCardItemModel) {
T t4 = t;
if (t4.equalItem(myOwnSkuCardItemModel) && t4.isLongSelected()) {
t4.setLongSelected(false);
myOwnSkuCardFragment.d.notifyItemChanged(i3);
}
}
i3 = i12;
}
}
}
}
@Override // com.shizhuang.duapp.modules.product_detail.own.p005interface.MyOwnSkuCardItemOperateCallBack
public void onClick(@NotNull MyOwnSkuCardItemModel myOwnSkuCardItemModel, int i) {
boolean z = PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel, new Integer(i)}, this, changeQuickRedirect, false, 280580, new Class[]{MyOwnSkuCardItemModel.class, Integer.TYPE}, Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.modules.product_detail.own.p005interface.MyOwnSkuCardItemOperateCallBack
public void onConfirmDelete(@NotNull MyOwnSkuCardItemModel myOwnSkuCardItemModel, int i) {
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel, new Integer(i)}, this, changeQuickRedirect, false, 280583, new Class[]{MyOwnSkuCardItemModel.class, Integer.TYPE}, Void.TYPE).isSupported) {
OwnDelKeepDialog ownDelKeepDialog = new OwnDelKeepDialog();
ownDelKeepDialog.y(new a(this, myOwnSkuCardItemModel));
ownDelKeepDialog.j(this.f22835a);
}
}
@Override // com.shizhuang.duapp.modules.product_detail.own.p005interface.MyOwnSkuCardItemOperateCallBack
public void onLongClick(@NotNull MyOwnSkuCardItemModel myOwnSkuCardItemModel, int i) {
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel, new Integer(i)}, this, changeQuickRedirect, false, 280581, new Class[]{MyOwnSkuCardItemModel.class, Integer.TYPE}, Void.TYPE).isSupported) {
MyOwnSkuCardFragment myOwnSkuCardFragment = this.f22835a;
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel}, myOwnSkuCardFragment, MyOwnSkuCardFragment.changeQuickRedirect, false, 280498, new Class[]{MyOwnSkuCardItemModel.class}, Void.TYPE).isSupported) {
int i3 = 0;
for (T t : myOwnSkuCardFragment.d.getItems()) {
int i12 = i3 + 1;
if (i3 < 0) {
CollectionsKt__CollectionsKt.throwIndexOverflow();
}
if (t instanceof MyOwnSkuCardItemModel) {
T t4 = t;
if (t4.isLongSelected() && !myOwnSkuCardItemModel.equalItem(t4)) {
t4.setLongSelected(false);
myOwnSkuCardFragment.d.notifyItemChanged(i3);
}
if (myOwnSkuCardItemModel.equalItem(t4) && !t4.isLongSelected()) {
t4.setLongSelected(true);
myOwnSkuCardFragment.d.notifyItemChanged(i3);
}
}
i3 = i12;
}
}
}
}
}
public MyOwnSkuCardFragment() {
StringBuilder h12 = f.h("KEY_OWN_SKU_DELETE_TIPS_");
String loginUserId = ServiceManager.d().getLoginUserId();
h12.append(loginUserId == null ? "" : loginUserId);
this.i = i.a(h12.toString(), Boolean.FALSE, null);
this.j = LazyKt__LazyJVMKt.lazy(new MyOwnSkuCardFragment$exposureHelper$2(this));
this.k = new q60.c();
this.l = new NoScrollLinearLayoutManager(getContext(), 0, false);
this.n = MallABTest.f13351a.I();
this.p = LazyKt__LazyJVMKt.lazy(new MyOwnSkuCardFragment$shareChannelExposureHelper$2(this));
this.s = true;
this.t = new k();
this.f22830u = CollectionsKt__CollectionsKt.listOf((Object[]) new String[]{"微信好友", "私信", "QQ", "发布晒单", "保存图片", "分享有礼", "去点评"});
this.f22831v = new b(this);
this.w = new c(this);
this.x = true;
}
public static void c(MyOwnSkuCardFragment myOwnSkuCardFragment, Bundle bundle) {
boolean z4 = false;
if (!PatchProxy.proxy(new Object[]{bundle}, myOwnSkuCardFragment, changeQuickRedirect, false, 280467, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
super.onCreate(bundle);
Bundle arguments = myOwnSkuCardFragment.getArguments();
if (arguments != null) {
z4 = arguments.getBoolean("isFromEditor", false);
}
q60.c cVar = myOwnSkuCardFragment.k;
MyOwnEditorEmotionCallBack myOwnEditorEmotionCallBack = new MyOwnEditorEmotionCallBack(myOwnSkuCardFragment, myOwnSkuCardFragment.d, z4);
myOwnSkuCardFragment.o = new MyOwnSkuCardFragment$onCreate$1$1(myOwnEditorEmotionCallBack);
Unit unit = Unit.INSTANCE;
cVar.a(myOwnEditorEmotionCallBack);
}
}
public static void d(MyOwnSkuCardFragment myOwnSkuCardFragment) {
if (!PatchProxy.proxy(new Object[0], myOwnSkuCardFragment, changeQuickRedirect, false, 280493, new Class[0], Void.TYPE).isSupported) {
super.onResume();
if (!PatchProxy.proxy(new Object[0], myOwnSkuCardFragment, changeQuickRedirect, false, 280494, new Class[0], Void.TYPE).isSupported) {
myOwnSkuCardFragment.k().n(false);
}
if (!PatchProxy.proxy(new Object[0], myOwnSkuCardFragment, changeQuickRedirect, false, 280495, new Class[0], Void.TYPE).isSupported) {
myOwnSkuCardFragment.k().l(false);
}
if (!PatchProxy.proxy(new Object[0], myOwnSkuCardFragment, changeQuickRedirect, false, 280496, new Class[0], Void.TYPE).isSupported) {
myOwnSkuCardFragment.k().o(false);
}
}
}
public static void e(MyOwnSkuCardFragment myOwnSkuCardFragment) {
if (!PatchProxy.proxy(new Object[0], myOwnSkuCardFragment, changeQuickRedirect, false, 280509, new Class[0], Void.TYPE).isSupported) {
super.onStart();
}
}
public static View f(MyOwnSkuCardFragment myOwnSkuCardFragment, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, myOwnSkuCardFragment, changeQuickRedirect, false, 280511, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
return proxy.isSupported ? (View) proxy.result : super.onCreateView(layoutInflater, viewGroup, bundle);
}
public static void g(MyOwnSkuCardFragment myOwnSkuCardFragment, View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, myOwnSkuCardFragment, changeQuickRedirect, false, 280513, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
super.onViewCreated(view, bundle);
}
}
public View _$_findCachedViewById(int i3) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 280506, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.C == null) {
this.C = new HashMap();
}
View view = (View) this.C.get(Integer.valueOf(i3));
if (view != null) {
return view;
}
View view2 = getView();
if (view2 == null) {
return null;
}
View findViewById = view2.findViewById(i3);
this.C.put(Integer.valueOf(i3), findViewById);
return findViewById;
}
public final MallModuleExposureHelper getExposureHelper() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280463, new Class[0], MallModuleExposureHelper.class);
return (MallModuleExposureHelper) (proxy.isSupported ? proxy.result : this.j.getValue());
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public int getLayout() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280468, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.fragment_my_own_sku_cards;
}
public final String h() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280458, new Class[0], String.class);
return (String) (proxy.isSupported ? proxy.result : this.b.getValue());
}
public final String i() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280459, new Class[0], String.class);
return (String) (proxy.isSupported ? proxy.result : this.f22826c.getValue());
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public void initData() {
LiveData<Boolean> liveData;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280473, new Class[0], Void.TYPE).isSupported) {
this.k.initData();
k().g().observe(this, new MyOwnSkuCardFragment$initData$1(this));
k().f().observe(this, new MyOwnSkuCardFragment$initData$2(this));
LoadResultKt.i(k().getPageResult(), this, new MyOwnSkuCardFragment$initData$3(this), new MyOwnSkuCardFragment$initData$4(this), new MyOwnSkuCardFragment$initData$5(this));
LoadResultKt.h(k().getLoadStatus(), this, new MyOwnSkuCardFragment$initData$6(this), new MyOwnSkuCardFragment$initData$7(this));
LiveDataExtensionKt.b(k().c(), this, new MyOwnSkuCardFragment$initData$8(this));
LiveDataExtensionKt.b(k().a(), this, new MyOwnSkuCardFragment$initData$9(this));
MyOwnViewModel k6 = k();
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], k6, MyOwnViewModel.changeQuickRedirect, false, 280886, new Class[0], LiveData.class);
if (proxy.isSupported) {
liveData = (LiveData) proxy.result;
} else {
liveData = k6.d;
}
liveData.observe(this, new MyOwnSkuCardFragment$initData$10(this));
mk1.d.m(new FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1(k().b().of(OwnCardAnimDismissEvent.class), new MyOwnSkuCardFragment$initData$11(this, null)), LifecycleOwnerKt.getLifecycleScope(this));
}
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
@SuppressLint({"ClickableViewAccessibility"})
public void initView(@org.jetbrains.annotations.Nullable Bundle bundle) {
co.d dVar;
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 280469, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
this.k.initView(bundle);
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280472, new Class[0], Void.TYPE).isSupported) {
this.d.getDelegate().C(MyOwnSkuCardItemModel.class, 1, null, -1, true, null, null, new MyOwnSkuCardFragment$initRecyclerView$1(this));
((SlowFlingRecyclerView) _$_findCachedViewById(R.id.rvDetail)).setAdapter(this.d);
((SlowFlingRecyclerView) _$_findCachedViewById(R.id.rvDetail)).setItemAnimator(null);
((SlowFlingRecyclerView) _$_findCachedViewById(R.id.rvDetail)).setLayoutManager(this.l);
LinearSnapHelper linearSnapHelper = new LinearSnapHelper();
linearSnapHelper.attachToRecyclerView((SlowFlingRecyclerView) _$_findCachedViewById(R.id.rvDetail));
((SlowFlingRecyclerView) _$_findCachedViewById(R.id.rvDetail)).addItemDecoration(new OwnListScaleItemDecoration(o5.i.f36333a, o5.i.f36333a, 0, 7));
ViewExtensionKt.p((SlowFlingRecyclerView) _$_findCachedViewById(R.id.rvDetail), new MyOwnSkuCardFragment$initRecyclerView$2(this, linearSnapHelper));
ViewExtensionKt.q((SlowFlingRecyclerView) _$_findCachedViewById(R.id.rvDetail), new MyOwnSkuCardFragment$initRecyclerView$3(this, linearSnapHelper));
LoadMoreHelper f12 = LoadMoreHelper.f(new l21.b(this));
this.f = f12;
if (f12 == null) {
Intrinsics.throwUninitializedPropertyAccessException("loadMoreHelper");
}
f12.d((SlowFlingRecyclerView) _$_findCachedViewById(R.id.rvDetail));
LoadMoreHelper loadMoreHelper = this.f;
if (loadMoreHelper == null) {
Intrinsics.throwUninitializedPropertyAccessException("loadMoreHelper");
}
loadMoreHelper.k(false);
}
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280484, new Class[0], Void.TYPE).isSupported) {
ViewExtensionKt.j((TextView) _$_findCachedViewById(R.id.tvShareUser), 0, new MyOwnSkuCardFragment$initShareViews$1(this), 1);
ViewExtensionKt.j((TextView) _$_findCachedViewById(R.id.tvShareWechat), 0, new MyOwnSkuCardFragment$initShareViews$2(this), 1);
ViewExtensionKt.j((TextView) _$_findCachedViewById(R.id.tvShareQQ), 0, new MyOwnSkuCardFragment$initShareViews$3(this), 1);
ViewExtensionKt.j((TextView) _$_findCachedViewById(R.id.tvEvaluate), 0, new MyOwnSkuCardFragment$initShareViews$4(this), 1);
ViewExtensionKt.j((TextView) _$_findCachedViewById(R.id.tvSharePoizon), 0, new MyOwnSkuCardFragment$initShareViews$5(this), 1);
ViewExtensionKt.j((TextView) _$_findCachedViewById(R.id.tvSavePic), 0, new MyOwnSkuCardFragment$initShareViews$6(this), 1);
}
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280471, new Class[0], Void.TYPE).isSupported) {
List<MyOwnSkuCardItemModel> value = k().f().getValue();
int size = value != null ? value.size() : 0;
Integer value2 = k().c().getValue();
if (value2 == null) {
value2 = 0;
}
((MLimitIndicator) _$_findCachedViewById(R.id.viewIndicator)).b(size, value2.intValue());
}
co.c i3 = ((DuImageLoaderView) _$_findCachedViewById(R.id.ivCardBg)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/ic_own_list_detail_bg.webp");
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], MyOwnActivity.f22821q, MyOwnActivity.a.changeQuickRedirect, false, 280428, new Class[0], co.d.class);
if (proxy.isSupported) {
dVar = (co.d) proxy.result;
} else {
dVar = MyOwnActivity.m;
}
((co.c) i3.v(dVar)).p0(DuScaleType.FIT_XY).x();
IMallExposureHelper.a.c(getExposureHelper(), MyOwnSkuCardFragment$initView$1.INSTANCE, null, MyOwnSkuCardFragment$initView$2.INSTANCE, null, 10, null);
j().setExposureCallback(new MyOwnSkuCardFragment$initView$3(this));
}
}
public final MyOwnSkuCardFragment$shareChannelExposureHelper$2.a j() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280464, new Class[0], MyOwnSkuCardFragment$shareChannelExposureHelper$2.a.class);
return (MyOwnSkuCardFragment$shareChannelExposureHelper$2.a) (proxy.isSupported ? proxy.result : this.p.getValue());
}
public final MyOwnViewModel k() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280460, new Class[0], MyOwnViewModel.class);
return (MyOwnViewModel) (proxy.isSupported ? proxy.result : this.e.getValue());
}
public final void l() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280474, new Class[0], Void.TYPE).isSupported && this.y) {
this.y = false;
MyOwnSkuCardItemModel e6 = MyOwnViewModel.e(k(), 0, 1);
if (e6 != null) {
p(e6);
}
}
}
public final void m() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280500, new Class[0], Void.TYPE).isSupported) {
int i3 = 0;
for (T t4 : this.d.getItems()) {
int i12 = i3 + 1;
if (i3 < 0) {
CollectionsKt__CollectionsKt.throwIndexOverflow();
}
if (t4 instanceof MyOwnSkuCardItemModel) {
T t12 = t4;
if (t12.isLongSelected()) {
t12.setLongSelected(false);
this.d.notifyItemChanged(i3);
}
}
i3 = i12;
}
}
}
public final void n(SHARE_MEDIA share_media) {
if (!PatchProxy.proxy(new Object[]{share_media}, this, changeQuickRedirect, false, 280490, new Class[]{SHARE_MEDIA.class}, Void.TYPE).isSupported) {
ik1.f.i(LifecycleOwnerKt.getLifecycleScope(this), null, null, new MyOwnSkuCardFragment$share$1(this, share_media, null), 3, null);
}
}
@SuppressLint({"DuPostDelayCheck"})
public final void o(MyOwnSkuCardItemModel myOwnSkuCardItemModel) {
TextView textView;
MyOwnOrderModel orderInfo;
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel}, this, changeQuickRedirect, false, 280480, new Class[]{MyOwnSkuCardItemModel.class}, Void.TYPE).isSupported) {
MyOwnSkuListItemModel sku = myOwnSkuCardItemModel.getSku();
String shareGiftMark = (sku == null || (orderInfo = sku.getOrderInfo()) == null) ? null : orderInfo.getShareGiftMark();
boolean z4 = !(shareGiftMark == null || shareGiftMark.length() == 0);
DuRequestOptions g3 = mn.a.f35714a.g("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/product_detail/ic_own_gift_bg.png");
LifecycleOwner m12 = LifecycleExtensionKt.m(this);
if (m12 == null) {
m12 = this;
}
((DuRequestOptions) g3.G(m12).u(new MyOwnSkuCardFragment$shouldShowGift$1(this))).y();
if (z4) {
((TextView) _$_findCachedViewById(R.id.tvShareGift)).setText(shareGiftMark);
((TextView) _$_findCachedViewById(R.id.tvShareGift)).setVisibility(0);
TextView textView2 = (TextView) _$_findCachedViewById(R.id.tvShareGift);
if (!PatchProxy.proxy(new Object[]{textView2}, this, changeQuickRedirect, false, 280481, new Class[]{View.class}, Void.TYPE).isSupported) {
this.A = new AnimatorSet();
LinearInterpolator linearInterpolator = new LinearInterpolator();
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(textView2, "alpha", o5.i.f36333a, 1.0f);
ofFloat.setDuration(350L);
ofFloat.setInterpolator(linearInterpolator);
ObjectAnimator ofFloat2 = ObjectAnimator.ofFloat(textView2, "scaleX", o5.i.f36333a, 1.0f, 1.1f, 1.0f);
ObjectAnimator ofFloat3 = ObjectAnimator.ofFloat(textView2, "scaleY", o5.i.f36333a, 1.0f, 1.1f, 1.0f);
ofFloat2.setDuration(350L);
ofFloat2.setInterpolator(linearInterpolator);
ofFloat3.setDuration(350L);
ofFloat3.setInterpolator(linearInterpolator);
textView2.setPivotX(((float) textView2.getWidth()) / 2.0f);
textView2.setPivotY(((float) textView2.getHeight()) / 2.0f);
AnimatorSet animatorSet = this.A;
if (animatorSet != null) {
animatorSet.play(ofFloat).with(ofFloat2).with(ofFloat3);
animatorSet.start();
return;
}
return;
}
return;
}
if ((((TextView) _$_findCachedViewById(R.id.tvShareGift)).getVisibility() == 0) && !PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280505, new Class[0], Void.TYPE).isSupported && (textView = (TextView) _$_findCachedViewById(R.id.tvShareGift)) != null) {
if (textView.getVisibility() == 0) {
TextView textView3 = (TextView) _$_findCachedViewById(R.id.tvShareGift);
if (!PatchProxy.proxy(new Object[]{textView3}, this, changeQuickRedirect, false, 280482, new Class[]{View.class}, Void.TYPE).isSupported) {
this.B = new AnimatorSet();
LinearInterpolator linearInterpolator2 = new LinearInterpolator();
ObjectAnimator ofFloat4 = ObjectAnimator.ofFloat(textView3, "alpha", 1.0f, o5.i.f36333a);
ofFloat4.addListener(new l21.a(textView3));
ofFloat4.setDuration(350L);
ofFloat4.setInterpolator(linearInterpolator2);
ObjectAnimator ofFloat5 = ObjectAnimator.ofFloat(textView3, "scaleX", 1.0f, o5.i.f36333a);
ObjectAnimator ofFloat6 = ObjectAnimator.ofFloat(textView3, "scaleY", 1.0f, o5.i.f36333a);
ofFloat5.setDuration(350L);
ofFloat5.setInterpolator(linearInterpolator2);
ofFloat6.setDuration(350L);
ofFloat6.setInterpolator(linearInterpolator2);
textView3.setPivotX(((float) textView3.getWidth()) / 2.0f);
textView3.setPivotY(((float) textView3.getHeight()) / 2.0f);
AnimatorSet animatorSet2 = this.B;
if (animatorSet2 != null) {
animatorSet2.play(ofFloat4).with(ofFloat5).with(ofFloat6);
animatorSet2.start();
}
}
}
}
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onCreate(Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 280466, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onCreate(this, bundle);
}
}
@Override // androidx.fragment.app.Fragment
@org.jetbrains.annotations.Nullable
public Animation onCreateAnimation(int i3, boolean z4, int i12) {
Object[] objArr = {new Integer(i3), new Byte(z4 ? (byte) 1 : 0), new Integer(i12)};
ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
Class cls = Integer.TYPE;
PatchProxyResult proxy = PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 280504, new Class[]{cls, Boolean.TYPE, cls}, Animation.class);
if (proxy.isSupported) {
return (Animation) proxy.result;
}
if (z4) {
return AnimationUtils.loadAnimation(getActivity(), R.anim.slide_right_in);
}
return AnimationUtils.loadAnimation(getActivity(), R.anim.slide_right_out);
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, this, changeQuickRedirect, false, 280510, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
return proxy.isSupported ? (View) proxy.result : _boostWeave.FragmentMethodWeaver_onCreateView(this, layoutInflater, viewGroup, bundle);
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onDestroy() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280503, new Class[0], Void.TYPE).isSupported) {
Job job = this.f22827g;
if (job != null) {
job.cancel((Job) ((CancellationException) null));
}
Job job2 = this.f22828h;
if (job2 != null) {
job2.cancel((Job) ((CancellationException) null));
}
super.onDestroy();
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onDestroyView() {
HashMap hashMap;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280483, new Class[0], Void.TYPE).isSupported) {
AnimatorSet animatorSet = this.B;
if (animatorSet != null) {
animatorSet.cancel();
}
AnimatorSet animatorSet2 = this.A;
if (animatorSet2 != null) {
animatorSet2.cancel();
}
l lVar = this.z;
if (lVar != null) {
lVar.c();
}
this.z = null;
super.onDestroyView();
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280507, new Class[0], Void.TYPE).isSupported && (hashMap = this.C) != null) {
hashMap.clear();
}
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public final void onMessageReceived(@NonNull @NotNull MessageEvent messageEvent) {
boolean z4;
MyOwnSkuCardItemModel e6;
List<MyOwnSpuItemModel> value;
List<MyOwnSpuItemModel> mutableList;
T t4;
MyOwnSkuListItemModel sku;
T t12;
if (!PatchProxy.proxy(new Object[]{messageEvent}, this, changeQuickRedirect, false, 280465, new Class[]{MessageEvent.class}, Void.TYPE).isSupported && Intrinsics.areEqual(messageEvent.getMessage(), "MSG_ADD_TREND_SUCCESS")) {
String orderId = messageEvent.getOrderId();
MyOwnViewModel k6 = k();
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{orderId}, k6, MyOwnViewModel.changeQuickRedirect, false, 280915, new Class[]{String.class}, Boolean.TYPE);
if (proxy.isSupported) {
z4 = ((Boolean) proxy.result).booleanValue();
} else {
if (orderId != null && (value = k6.m.getValue()) != null && (mutableList = CollectionsKt___CollectionsKt.toMutableList((Collection) value)) != null) {
Iterator it2 = mutableList.iterator();
int i3 = 0;
while (true) {
if (!it2.hasNext()) {
break;
}
Object next = it2.next();
int i12 = i3 + 1;
if (i3 < 0) {
CollectionsKt__CollectionsKt.throwIndexOverflow();
}
MyOwnSpuItemModel myOwnSpuItemModel = (MyOwnSpuItemModel) next;
List<MyOwnSkuListItemModel> skuInfos = myOwnSpuItemModel.getSkuInfos();
Integer num = null;
if (skuInfos != null) {
Iterator<T> it3 = skuInfos.iterator();
while (true) {
if (!it3.hasNext()) {
t12 = null;
break;
}
t12 = it3.next();
MyOwnOrderModel orderInfo = t12.getOrderInfo();
if (Intrinsics.areEqual(orderInfo != null ? orderInfo.getSubOrderNo() : null, orderId)) {
break;
}
}
t4 = t12;
} else {
t4 = null;
}
if (t4 != null) {
int indexOf = myOwnSpuItemModel.getSkuInfos().indexOf(t4);
MyOwnOrderModel orderInfo2 = t4.getOrderInfo();
MyOwnSkuListItemModel copy$default = MyOwnSkuListItemModel.copy$default(t4, null, null, orderInfo2 != null ? MyOwnOrderModel.copy$default(orderInfo2, null, null, null, null, 0, null, 55, null) : null, null, null, null, 0, 0, null, 0, null, null, null, 8187, null);
List mutableList2 = CollectionsKt___CollectionsKt.toMutableList((Collection) myOwnSpuItemModel.getSkuInfos());
mutableList2.set(indexOf, copy$default);
Unit unit = Unit.INSTANCE;
MyOwnSpuItemModel copy$default2 = MyOwnSpuItemModel.copy$default(myOwnSpuItemModel, 0, false, null, mutableList2, 0, 0, 0, 0, false, false, 1015, null);
List<MyOwnSkuCardItemModel> value2 = k6.o.getValue();
if (value2 != null) {
Iterator<MyOwnSkuCardItemModel> it4 = value2.iterator();
int i13 = 0;
while (true) {
if (!it4.hasNext()) {
i13 = -1;
break;
}
MyOwnSkuCardItemModel next2 = it4.next();
if (next2.getSpuId() == myOwnSpuItemModel.getSpuId() && (sku = next2.getSku()) != null && sku.getSkuId() == t4.getSkuId()) {
break;
}
i13++;
}
num = Integer.valueOf(i13);
}
mutableList.set(i3, copy$default2);
k6.l.setValue(mutableList);
if (Intrinsics.areEqual(k6.f22865h.getValue(), num)) {
z4 = true;
}
} else {
i3 = i12;
}
}
}
z4 = false;
}
if (z4 && (e6 = MyOwnViewModel.e(k(), 0, 1)) != null) {
r(e6);
o(e6);
}
}
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public void onNetErrorRetryClick() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280497, new Class[0], Void.TYPE).isSupported) {
super.onNetErrorRetryClick();
k().fetchData(true);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onResume() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280492, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onResume(this);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onStart() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 280508, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onStart(this);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onViewCreated(View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, this, changeQuickRedirect, false, 280512, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onViewCreated(this, view, bundle);
}
}
public final void p(MyOwnSkuCardItemModel myOwnSkuCardItemModel) {
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel}, this, changeQuickRedirect, false, 280478, new Class[]{MyOwnSkuCardItemModel.class}, Void.TYPE).isSupported) {
l lVar = this.z;
if (lVar != null) {
lVar.c();
}
MyOwnSkuListItemModel sku = myOwnSkuCardItemModel.getSku();
if (sku != null && sku.isGift()) {
ik1.f.i(LifecycleOwnerKt.getLifecycleScope(this), null, null, new MyOwnSkuCardFragment$showPersonalLatterTips$1(this, myOwnSkuCardItemModel, null), 3, null);
}
}
}
public final void q(Pair<Integer, String> pair) {
MyOwnSkuCardItemModel e6;
if (!PatchProxy.proxy(new Object[]{pair}, this, changeQuickRedirect, false, 280491, new Class[]{Pair.class}, Void.TYPE).isSupported && (e6 = MyOwnViewModel.e(k(), 0, 1)) != null) {
u21.a aVar = u21.a.f38776a;
String second = pair.getSecond();
MyOwnSkuListItemModel sku = e6.getSku();
String str = "";
Object valueOf = sku != null ? Long.valueOf(sku.getSkuId()) : str;
String valueOf2 = String.valueOf(pair.getFirst().intValue());
MyOwnSkuListItemModel sku2 = e6.getSku();
Object valueOf3 = sku2 != null ? Integer.valueOf(sku2.getTitleType()) : str;
MyOwnSkuListItemModel sku3 = e6.getSku();
String title = sku3 != null ? sku3.getTitle() : null;
if (title != null) {
str = title;
}
if (!PatchProxy.proxy(new Object[]{second, valueOf, valueOf2, valueOf3, str}, aVar, u21.a.changeQuickRedirect, false, 282112, new Class[]{Object.class, Object.class, Object.class, Object.class, Object.class}, Void.TYPE).isSupported) {
i60.b bVar = i60.b.f33293a;
ArrayMap arrayMap = new ArrayMap(8);
arrayMap.put("block_content_title", second);
arrayMap.put("sku_id", valueOf);
arrayMap.put("share_platform_title", valueOf2);
arrayMap.put("honor_type", valueOf3);
arrayMap.put("honor_title", str);
bVar.b("trade_page_share_click", "1016", "155", arrayMap);
}
}
}
public final void r(MyOwnSkuCardItemModel myOwnSkuCardItemModel) {
int i3 = 0;
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel}, this, changeQuickRedirect, false, 280476, new Class[]{MyOwnSkuCardItemModel.class}, Void.TYPE).isSupported) {
if (myOwnSkuCardItemModel.isShareGift()) {
((TextView) _$_findCachedViewById(R.id.tvSharePoizon)).setText("发布晒单");
((TextView) _$_findCachedViewById(R.id.tvSharePoizon)).setCompoundDrawablesRelativeWithIntrinsicBounds(0, R.drawable.ic_du_share_poizon, 0, 0);
} else {
((TextView) _$_findCachedViewById(R.id.tvSharePoizon)).setText("发布动态");
((TextView) _$_findCachedViewById(R.id.tvSharePoizon)).setCompoundDrawablesRelativeWithIntrinsicBounds(0, R.drawable.ic_du_share_camera, 0, 0);
}
((TextView) _$_findCachedViewById(R.id.tvEvaluate)).setVisibility(myOwnSkuCardItemModel.getShowComment() ? 0 : 8);
TextView textView = (TextView) _$_findCachedViewById(R.id.tvShareQQ);
if (!(true ^ (((TextView) _$_findCachedViewById(R.id.tvEvaluate)).getVisibility() == 0))) {
i3 = 8;
}
textView.setVisibility(i3);
}
}
public final void s(@NotNull MyOwnSkuCardItemModel myOwnSkuCardItemModel) {
Context context;
String str;
MyOwnGiverInfo giverInfo;
MyOwnOrderModel orderInfo;
MyOwnOrderModel orderInfo2;
MyOwnOrderModel orderInfo3;
if (!PatchProxy.proxy(new Object[]{myOwnSkuCardItemModel}, this, changeQuickRedirect, false, 280475, new Class[]{MyOwnSkuCardItemModel.class}, Void.TYPE).isSupported && (context = getContext()) != null) {
long spuId = myOwnSkuCardItemModel.getSpuId();
MyOwnSkuListItemModel sku = myOwnSkuCardItemModel.getSku();
long skuId = sku != null ? sku.getSkuId() : 0;
String name = myOwnSkuCardItemModel.getName();
MyOwnSkuListItemModel sku2 = myOwnSkuCardItemModel.getSku();
String img = sku2 != null ? sku2.getImg() : null;
MyOwnSkuListItemModel sku3 = myOwnSkuCardItemModel.getSku();
String propertiesValue = sku3 != null ? sku3.getPropertiesValue() : null;
boolean isPlatformBuy = myOwnSkuCardItemModel.isPlatformBuy();
MyOwnSkuListItemModel sku4 = myOwnSkuCardItemModel.getSku();
String createTime = sku4 != null ? sku4.getCreateTime() : null;
MyOwnSkuListItemModel sku5 = myOwnSkuCardItemModel.getSku();
int titleType = sku5 != null ? sku5.getTitleType() : 0;
MyOwnSkuListItemModel sku6 = myOwnSkuCardItemModel.getSku();
String title = sku6 != null ? sku6.getTitle() : null;
MyOwnSkuListItemModel sku7 = myOwnSkuCardItemModel.getSku();
String buyerName = (sku7 == null || (orderInfo3 = sku7.getOrderInfo()) == null) ? null : orderInfo3.getBuyerName();
MyOwnSkuListItemModel sku8 = myOwnSkuCardItemModel.getSku();
String buyerPhone = (sku8 == null || (orderInfo2 = sku8.getOrderInfo()) == null) ? null : orderInfo2.getBuyerPhone();
MyOwnSkuListItemModel sku9 = myOwnSkuCardItemModel.getSku();
String orderMoney = (sku9 == null || (orderInfo = sku9.getOrderInfo()) == null) ? null : orderInfo.getOrderMoney();
MyOwnSkuListItemModel sku10 = myOwnSkuCardItemModel.getSku();
String selectEmotion = sku10 != null ? sku10.getSelectEmotion() : null;
String str2 = selectEmotion != null ? selectEmotion : "";
MyOwnSkuListItemModel sku11 = myOwnSkuCardItemModel.getSku();
boolean isGift = sku11 != null ? sku11.isGift() : false;
MyOwnSkuListItemModel sku12 = myOwnSkuCardItemModel.getSku();
String userName = (sku12 == null || (giverInfo = sku12.getGiverInfo()) == null) ? null : giverInfo.getUserName();
if (userName != null) {
str = userName;
} else {
str = "";
}
MyOwnSkuListItemModel sku13 = myOwnSkuCardItemModel.getSku();
f21.c cVar = new f21.c(spuId, skuId, name, img, propertiesValue, isPlatformBuy, createTime, titleType, title, null, buyerName, buyerPhone, orderMoney, str2, isGift, str, (sku13 != null ? sku13.getIntentionInfo() : null) != null, 512);
MyOwnSkuListItemModel sku14 = myOwnSkuCardItemModel.getSku();
if (sku14 == null || !sku14.isVerifySuccess() || !this.n) {
ExOwnSkuCardShareView exOwnSkuCardShareView = this.f22829q;
if (exOwnSkuCardShareView == null) {
exOwnSkuCardShareView = new ExOwnSkuCardShareView(context, null, "own_card_detail_share", 2);
this.f22829q = exOwnSkuCardShareView;
}
InterceptConstraintLayout interceptConstraintLayout = (InterceptConstraintLayout) _$_findCachedViewById(R.id.content);
MyOwnSkuCardFragment$updateShareView$2 myOwnSkuCardFragment$updateShareView$2 = new MyOwnSkuCardFragment$updateShareView$2(cVar);
if (!PatchProxy.proxy(new Object[]{exOwnSkuCardShareView, interceptConstraintLayout, myOwnSkuCardFragment$updateShareView$2}, null, f21.a.changeQuickRedirect, true, 277687, new Class[]{ExOwnSkuCardShareView.class, ViewGroup.class, Function1.class}, Void.TYPE).isSupported) {
if (!exOwnSkuCardShareView.isAttachedToWindow()) {
interceptConstraintLayout.addView(exOwnSkuCardShareView);
}
f21.a.a(exOwnSkuCardShareView, myOwnSkuCardFragment$updateShareView$2);
return;
}
return;
}
ExOwnSkuCardShareViewNew exOwnSkuCardShareViewNew = this.r;
if (exOwnSkuCardShareViewNew == null) {
exOwnSkuCardShareViewNew = new ExOwnSkuCardShareViewNew(context, null, "own_card_detail_share", 2);
this.r = exOwnSkuCardShareViewNew;
}
InterceptConstraintLayout interceptConstraintLayout2 = (InterceptConstraintLayout) _$_findCachedViewById(R.id.content);
MyOwnSkuCardFragment$updateShareView$1 myOwnSkuCardFragment$updateShareView$1 = new MyOwnSkuCardFragment$updateShareView$1(cVar);
if (!PatchProxy.proxy(new Object[]{exOwnSkuCardShareViewNew, interceptConstraintLayout2, myOwnSkuCardFragment$updateShareView$1}, null, f21.b.changeQuickRedirect, true, 277711, new Class[]{ExOwnSkuCardShareViewNew.class, ViewGroup.class, Function1.class}, Void.TYPE).isSupported) {
if (!exOwnSkuCardShareViewNew.isAttachedToWindow()) {
interceptConstraintLayout2.addView(exOwnSkuCardShareViewNew);
}
if (!PatchProxy.proxy(new Object[]{exOwnSkuCardShareViewNew, myOwnSkuCardFragment$updateShareView$1}, null, f21.b.changeQuickRedirect, true, 277709, new Class[]{ExOwnSkuCardShareViewNew.class, Function1.class}, Void.TYPE).isSupported) {
exOwnSkuCardShareViewNew.setVisibility(0);
exOwnSkuCardShareViewNew.setTranslationX((float) fi.b.f32351a);
myOwnSkuCardFragment$updateShareView$1.invoke((Object) exOwnSkuCardShareViewNew);
}
}
}
}
}