得物.apk(点击下载) / NftCollectionListActivity.java


package com.shizhuang.duapp.modules.personal.activity;

import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.AppCompatImageButton;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.res.ResourcesCompat;
import androidx.core.view.ViewCompat;
import androidx.core.view.ViewKt;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.MutableLiveData;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.appbar.CollapsingToolbarLayout;
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.bean.UsersModel;
import com.shizhuang.duapp.common.exposure.DuExposureHelper;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.common.extension.ViewModelLifecycleAwareLazy;
import com.shizhuang.duapp.common.helper.loadmore.LoadMoreHelper;
import com.shizhuang.duapp.common.recyclerview.adapter.AdapterExposure;
import com.shizhuang.duapp.common.recyclerview.adapter.DuDelegateAdapter;
import com.shizhuang.duapp.common.recyclerview.manager.DuVirtualLayoutManager;
import com.shizhuang.duapp.common.ui.BaseLeftBackActivity;
import com.shizhuang.duapp.common.widget.PlaceholderLayout;
import com.shizhuang.duapp.common.widget.shapeview.ShapeView;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuRequestOptions;
import com.shizhuang.duapp.modules.du_community_common.facade.request.DuHttpRequest;
import com.shizhuang.duapp.modules.du_community_common.view.AvatarView;
import com.shizhuang.duapp.modules.personal.adapter.NftCollectionFooterAdapter;
import com.shizhuang.duapp.modules.personal.adapter.NftCollectionListAdapter;
import com.shizhuang.duapp.modules.personal.model.GuideInfoModel;
import com.shizhuang.duapp.modules.personal.model.HideInfoModel;
import com.shizhuang.duapp.modules.personal.model.NftItemModel;
import com.shizhuang.duapp.modules.personal.model.NftListModel;
import com.shizhuang.duapp.modules.personal.model.RefreshNftCollectionListEvent;
import com.shizhuang.duapp.modules.personal.model.ShopInfoModel;
import com.shizhuang.duapp.modules.personal.view.NftItemAnimator;
import com.shizhuang.duapp.modules.personal.view.RollingFontTextView;
import com.shizhuang.duapp.modules.personal.viewmodel.NftCollectionListViewModel;
import com.shizhuang.duapp.modules.router.ServiceManager;
import com.shizhuang.duapp.modules.router.service.account.IAccountService;
import com.shizhuang.duapp.vesdk.utils.ArfaceHelper;
import com.shizhuang.duapp.vesdk.utils.ArfaceHelper$checkArfaceQuietly$1;
import df.b0;
import df.o0;
import df.r0;
import ee.g;
import ik1.f;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.JvmField;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref;
import ky0.k;
import kz0.d;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import t20.n;
import u91.c;
import v20.i;
import v20.j;

@Route(path = "/nft/collectionList")
@Metadata(bv = {}, d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0007\u0018\u00002\u00020\u0001:\u0001\fB\u0007¢\u0006\u0004\b\n\u0010\u000bJ\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0007J\u0010\u0010\u0007\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0006H\u0007J\u0010\u0010\t\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\bH\u0007¨\u0006\r"}, d2 = {"Lcom/shizhuang/duapp/modules/personal/activity/NftCollectionListActivity;", "Lcom/shizhuang/duapp/common/ui/BaseLeftBackActivity;", "Lcom/shizhuang/duapp/modules/personal/model/RefreshNftCollectionListEvent;", "event", "", "onEvent", "Lqy0/b;", "onNftDetailChange", "Lqy0/a;", "onNftAirdropReceiveChange", "<init>", "()V", "a", "du_personal_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: NftCollectionListActivity.kt */
public final class NftCollectionListActivity extends BaseLeftBackActivity {
    public static ChangeQuickRedirect changeQuickRedirect;
    @NotNull
    public static final a o = new a(null);
    @Autowired(desc = "用户ID", name = "userId")
    @JvmField
    @Nullable

    /* renamed from: c  reason: collision with root package name */
    public String f21295c;
    public final Lazy d = new ViewModelLifecycleAwareLazy(this, new NftCollectionListActivity$$special$$inlined$duViewModel$1(this));
    public final Lazy e;
    public final Lazy f;

    /* renamed from: g  reason: collision with root package name */
    public final Lazy f21296g;

    /* renamed from: h  reason: collision with root package name */
    public final Lazy f21297h;
    public final Lazy i;
    public AlphaAnimation j;
    public AlphaAnimation k;
    public LoadMoreHelper l;
    public boolean m;
    public HashMap n;

    public class _boostWeave {
        public static ChangeQuickRedirect changeQuickRedirect;

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onCreate")
        @Keep
        public static void ActivityMethodWeaver_onCreate(@androidx.annotation.Nullable NftCollectionListActivity nftCollectionListActivity, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{nftCollectionListActivity, bundle}, null, changeQuickRedirect, true, 251991, new Class[]{NftCollectionListActivity.class, Bundle.class}, Void.TYPE).isSupported) {
                jn.b bVar = jn.b.f34396a;
                if (!bVar.b()) {
                    bVar.d(true);
                }
                long currentTimeMillis = System.currentTimeMillis();
                NftCollectionListActivity.e(nftCollectionListActivity, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (nftCollectionListActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.personal.activity.NftCollectionListActivity")) {
                    bVar.activityOnCreateMethod(nftCollectionListActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onResume")
        @Keep
        public static void ActivityMethodWeaver_onResume(NftCollectionListActivity nftCollectionListActivity) {
            if (!PatchProxy.proxy(new Object[]{nftCollectionListActivity}, null, changeQuickRedirect, true, 251990, new Class[]{NftCollectionListActivity.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                NftCollectionListActivity.d(nftCollectionListActivity);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (nftCollectionListActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.personal.activity.NftCollectionListActivity")) {
                    jn.b.f34396a.activityOnResumeMethod(nftCollectionListActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onStart")
        @Keep
        public static void ActivityMethodWeaver_onStart(NftCollectionListActivity nftCollectionListActivity) {
            if (!PatchProxy.proxy(new Object[]{nftCollectionListActivity}, null, changeQuickRedirect, true, 251992, new Class[]{NftCollectionListActivity.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                NftCollectionListActivity.f(nftCollectionListActivity);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (nftCollectionListActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.personal.activity.NftCollectionListActivity")) {
                    jn.b.f34396a.activityOnStartMethod(nftCollectionListActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }
    }

    /* compiled from: NftCollectionListActivity.kt */
    public static final class a {
        public static ChangeQuickRedirect changeQuickRedirect;

        public a(DefaultConstructorMarker defaultConstructorMarker) {
        }

        public final void a(@NotNull Activity activity, @Nullable String str) {
            if (!PatchProxy.proxy(new Object[]{activity, str}, this, changeQuickRedirect, false, 251989, new Class[]{Activity.class, String.class}, Void.TYPE).isSupported) {
                ARouter.getInstance().build("/nft/collectionList").withString("userId", str).navigation(activity);
            }
        }
    }

    /* compiled from: NftCollectionListActivity.kt */
    public static final class b implements LoadMoreHelper.LoadMoreListener {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ NftCollectionListActivity f21300a;

        public b(NftCollectionListActivity nftCollectionListActivity) {
            this.f21300a = nftCollectionListActivity;
        }

        @Override // com.shizhuang.duapp.common.helper.loadmore.LoadMoreHelper.LoadMoreListener
        public final void loadData(boolean z) {
            if (!PatchProxy.proxy(new Object[]{new Byte(z ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 252019, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
                NftCollectionListViewModel.getNftCollectionList$default(this.f21300a.k(), false, 1, null);
            }
        }
    }

    static {
        g.a().c(NftCollectionListActivity.class);
    }

    public NftCollectionListActivity() {
        LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.NONE;
        this.e = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, (Function0) new NftCollectionListActivity$adapter$2(this));
        this.f = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, (Function0) NftCollectionListActivity$listAdapter$2.INSTANCE);
        this.f21296g = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, (Function0) new NftCollectionListActivity$virtualLayoutManager$2(this));
        this.f21297h = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, (Function0) NftCollectionListActivity$footerAdapter$2.INSTANCE);
        this.i = LazyKt__LazyJVMKt.lazy(NftCollectionListActivity$menuTipsPop$2.INSTANCE);
    }

    public static void d(NftCollectionListActivity nftCollectionListActivity) {
        if (!PatchProxy.proxy(new Object[0], nftCollectionListActivity, changeQuickRedirect, false, 251977, new Class[0], Void.TYPE).isSupported) {
            super.onResume();
            o0.b("community_nft_pageview", new NftCollectionListActivity$onResume$1(nftCollectionListActivity));
            if (nftCollectionListActivity.m) {
                nftCollectionListActivity.m = false;
                nftCollectionListActivity.k().getNftCollectionList(true);
            }
        }
    }

    public static void e(NftCollectionListActivity nftCollectionListActivity, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, nftCollectionListActivity, changeQuickRedirect, false, 251984, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onCreate(bundle);
        }
    }

    public static void f(NftCollectionListActivity nftCollectionListActivity) {
        if (!PatchProxy.proxy(new Object[0], nftCollectionListActivity, changeQuickRedirect, false, 251986, new Class[0], Void.TYPE).isSupported) {
            super.onStart();
        }
    }

    public View _$_findCachedViewById(int i3) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 251981, new Class[]{Integer.TYPE}, View.class);
        if (proxy.isSupported) {
            return (View) proxy.result;
        }
        if (this.n == null) {
            this.n = new HashMap();
        }
        View view = (View) this.n.get(Integer.valueOf(i3));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i3);
        this.n.put(Integer.valueOf(i3), findViewById);
        return findViewById;
    }

    public final DuDelegateAdapter g() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251952, new Class[0], DuDelegateAdapter.class);
        return (DuDelegateAdapter) (proxy.isSupported ? proxy.result : this.e.getValue());
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public int getLayout() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251957, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.du_personal_activity_nft_collection_list;
    }

    public final NftCollectionFooterAdapter h() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251955, new Class[0], NftCollectionFooterAdapter.class);
        return (NftCollectionFooterAdapter) (proxy.isSupported ? proxy.result : this.f21297h.getValue());
    }

    public final NftCollectionListAdapter i() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251953, new Class[0], NftCollectionListAdapter.class);
        return (NftCollectionListAdapter) (proxy.isSupported ? proxy.result : this.f.getValue());
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initData() {
        View _$_findCachedViewById;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251962, new Class[0], Void.TYPE).isSupported) {
            k().setUserId(this.f21295c);
            DuHttpRequest<NftListModel> getNftCollectionListRequest = k().getGetNftCollectionListRequest();
            String str = null;
            j jVar = new j(this, getNftCollectionListRequest.isShowErrorToast(), null);
            Ref.BooleanRef booleanRef = new Ref.BooleanRef();
            booleanRef.element = getNftCollectionListRequest.getMutableAllStateLiveData().getValue() instanceof DuHttpRequest.b.a;
            MutableLiveData<DuHttpRequest.b<NftListModel>> mutableAllStateLiveData = getNftCollectionListRequest.getMutableAllStateLiveData();
            i iVar = i.f39125a;
            mutableAllStateLiveData.observe(iVar.a(this), new NftCollectionListActivity$initData$$inlined$observe$1(getNftCollectionListRequest, jVar, booleanRef, this));
            DuHttpRequest<String> setNftCollectionListHideRequest = k().getSetNftCollectionListHideRequest();
            j jVar2 = new j(this, setNftCollectionListHideRequest.isShowErrorToast(), null);
            Ref.BooleanRef booleanRef2 = new Ref.BooleanRef();
            booleanRef2.element = setNftCollectionListHideRequest.getMutableAllStateLiveData().getValue() instanceof DuHttpRequest.b.a;
            setNftCollectionListHideRequest.getMutableAllStateLiveData().observe(iVar.a(this), new NftCollectionListActivity$initData$$inlined$observe$2(setNftCollectionListHideRequest, jVar2, booleanRef2, this));
            NftCollectionListViewModel.getNftCollectionList$default(k(), false, 1, null);
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251968, new Class[0], Void.TYPE).isSupported && ((Boolean) b0.f("nft_collection_list_first_enter", Boolean.TRUE)).booleanValue()) {
                String userId = k().getUserId();
                IAccountService d12 = ServiceManager.d();
                if (d12 != null) {
                    str = d12.getUserId();
                }
                if (Intrinsics.areEqual(userId, str) && (_$_findCachedViewById = _$_findCachedViewById(R.id.firstEnter)) != null) {
                    ViewKt.setVisible(_$_findCachedViewById, true);
                }
            }
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initStatusBar() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251958, new Class[0], Void.TYPE).isSupported) {
            r0.s(this, true);
            r0.z(this, null);
            r0.u(this, ResourcesCompat.getColor(getResources(), R.color.black, getTheme()));
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initView(@Nullable Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 251961, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.initView(bundle);
            ((PlaceholderLayout) _$_findCachedViewById(R.id.placeholderLayout)).setEmptyBackgroundColor(Color.parseColor("#14151A"));
            ((PlaceholderLayout) _$_findCachedViewById(R.id.placeholderLayout)).setNetworkBackgroundColor(Color.parseColor("#14151A"));
            ActionBar supportActionBar = getSupportActionBar();
            if (supportActionBar != null) {
                supportActionBar.setDisplayShowTitleEnabled(false);
            }
            p();
            ((CollapsingToolbarLayout) _$_findCachedViewById(R.id.collapsingToolbar)).setTitle("");
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251959, new Class[0], Void.TYPE).isSupported) {
                int j12 = fi.b.j(this);
                ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) this.toolbar.getLayoutParams();
                marginLayoutParams.topMargin = j12;
                this.toolbar.setLayoutParams(marginLayoutParams);
                ViewGroup.LayoutParams layoutParams = _$_findCachedViewById(R.id.viewStatusBar).getLayoutParams();
                layoutParams.height = j12;
                _$_findCachedViewById(R.id.viewStatusBar).setLayoutParams(layoutParams);
                _$_findCachedViewById(R.id.viewStatusBar).setBackgroundColor(g5.a.a(o5.i.f36333a, ViewCompat.MEASURED_STATE_MASK));
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251960, new Class[0], Void.TYPE).isSupported) {
                ((AppBarLayout) _$_findCachedViewById(R.id.appbar)).addOnOffsetChangedListener((AppBarLayout.OnOffsetChangedListener) new k(this));
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251967, new Class[0], Void.TYPE).isSupported) {
                TextView textView = (TextView) _$_findCachedViewById(R.id.shop);
                if (textView != null) {
                    ViewExtensionKt.h(textView, new NftCollectionListActivity$initClick$1(this));
                }
                ImageView imageView = (ImageView) _$_findCachedViewById(R.id.menuIv);
                if (imageView != null) {
                    ViewExtensionKt.h(imageView, new NftCollectionListActivity$initClick$2(this));
                }
                ImageView imageView2 = (ImageView) _$_findCachedViewById(R.id.enterButton);
                if (imageView2 != null) {
                    ViewExtensionKt.h(imageView2, new NftCollectionListActivity$initClick$3(this));
                }
                ImageView imageView3 = (ImageView) _$_findCachedViewById(R.id.hideOrShowIv);
                if (imageView3 != null) {
                    ViewExtensionKt.h(imageView3, new NftCollectionListActivity$initClick$4(this));
                }
                TextView textView2 = (TextView) _$_findCachedViewById(R.id.userName);
                if (textView2 != null) {
                    ViewExtensionKt.h(textView2, new NftCollectionListActivity$initClick$5(this));
                }
                AvatarView avatarView = (AvatarView) _$_findCachedViewById(R.id.avatarIv);
                if (avatarView != null) {
                    ViewExtensionKt.h(avatarView, new NftCollectionListActivity$initClick$6(this));
                }
                View _$_findCachedViewById = _$_findCachedViewById(R.id.firstEnter);
                if (_$_findCachedViewById != null) {
                    ViewExtensionKt.h(_$_findCachedViewById, NftCollectionListActivity$initClick$7.INSTANCE);
                }
                AppCompatImageButton appCompatImageButton = (AppCompatImageButton) _$_findCachedViewById(R.id.firstEnterBack);
                if (appCompatImageButton != null) {
                    ViewExtensionKt.h(appCompatImageButton, new NftCollectionListActivity$initClick$8(this));
                }
            }
            i().setOnItemClickListener(new NftCollectionListActivity$initView$$inlined$apply$lambda$1(this));
            RecyclerView recyclerView = (RecyclerView) _$_findCachedViewById(R.id.recyclerView);
            NftItemAnimator nftItemAnimator = new NftItemAnimator();
            nftItemAnimator.setAddDuration(400);
            nftItemAnimator.setRemoveDuration(400);
            Unit unit = Unit.INSTANCE;
            recyclerView.setItemAnimator(nftItemAnimator);
            recyclerView.setLayoutManager(l());
            recyclerView.setAdapter(g());
            g().addAdapter(i());
            g().addAdapter(h());
            i().uploadSensorExposure(true);
            AdapterExposure.b.a(i(), new DuExposureHelper(this, null, false, 6), null, 2, null);
            LoadMoreHelper f12 = LoadMoreHelper.f(new b(this));
            this.l = f12;
            if (f12 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("loadMoreHelper");
            }
            f12.d((RecyclerView) _$_findCachedViewById(R.id.recyclerView));
            ArfaceHelper arfaceHelper = ArfaceHelper.f26177a;
            if (!PatchProxy.proxy(new Object[]{this}, arfaceHelper, ArfaceHelper.changeQuickRedirect, false, 336206, new Class[]{Context.class}, Void.TYPE).isSupported) {
                arfaceHelper.e(false, this, ArfaceHelper$checkArfaceQuietly$1.INSTANCE);
            }
        }
    }

    public final d j() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251956, new Class[0], d.class);
        return (d) (proxy.isSupported ? proxy.result : this.i.getValue());
    }

    public final NftCollectionListViewModel k() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251951, new Class[0], NftCollectionListViewModel.class);
        return (NftCollectionListViewModel) (proxy.isSupported ? proxy.result : this.d.getValue());
    }

    public final DuVirtualLayoutManager l() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251954, new Class[0], DuVirtualLayoutManager.class);
        return (DuVirtualLayoutManager) (proxy.isSupported ? proxy.result : this.f21296g.getValue());
    }

    public final void m() {
        NftListModel nftListModel;
        ShopInfoModel shop;
        String jumpUrl;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251970, new Class[0], Void.TYPE).isSupported && (nftListModel = k().getNftListModel()) != null && (shop = nftListModel.getShop()) != null && (jumpUrl = shop.getJumpUrl()) != null) {
            c.c().a(jumpUrl).e(this);
        }
    }

    public final void n() {
        UsersModel userInfo;
        String str;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251971, new Class[0], Void.TYPE).isSupported) {
            o0.b("community_user_click", new NftCollectionListActivity$goToUserHome$1(this));
            NftListModel nftListModel = k().getNftListModel();
            if (nftListModel != null && (userInfo = nftListModel.getUserInfo()) != null && (str = userInfo.userId) != null) {
                h6.a.d("/trend/UserHomePage", "userId", str, "sourcePage", -1).withBoolean("isSecret", false).withParcelable("userInfoModel", null).navigation(this);
            }
        }
    }

    public final void o(boolean z) {
        int i3 = 0;
        if (!PatchProxy.proxy(new Object[]{new Byte(z ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 251974, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
            ((ConstraintLayout) _$_findCachedViewById(R.id.collectionNumLayout)).setVisibility(z ? 8 : 0);
            View _$_findCachedViewById = _$_findCachedViewById(R.id.clToolBar);
            if (z) {
                i3 = 8;
            }
            _$_findCachedViewById.setVisibility(i3);
        }
    }

    @Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onCreate(Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 251983, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onCreate(this, bundle);
        }
    }

    @Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onDestroy() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251972, new Class[0], Void.TYPE).isSupported) {
            super.onDestroy();
            AlphaAnimation alphaAnimation = this.j;
            if (alphaAnimation != null) {
                alphaAnimation.cancel();
            }
            AlphaAnimation alphaAnimation2 = this.k;
            if (alphaAnimation2 != null) {
                alphaAnimation2.cancel();
            }
        }
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public final void onEvent(@NotNull RefreshNftCollectionListEvent refreshNftCollectionListEvent) {
        if (!PatchProxy.proxy(new Object[]{refreshNftCollectionListEvent}, this, changeQuickRedirect, false, 251978, new Class[]{RefreshNftCollectionListEvent.class}, Void.TYPE).isSupported) {
            this.m = true;
        }
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public final void onNftAirdropReceiveChange(@NotNull qy0.a aVar) {
        boolean z = false;
        if (!PatchProxy.proxy(new Object[]{aVar}, this, changeQuickRedirect, false, 251980, new Class[]{qy0.a.class}, Void.TYPE).isSupported) {
            String a5 = aVar.a();
            if (a5 == null || a5.length() == 0) {
                z = true;
            }
            if (!z) {
                this.m = true;
            }
        }
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public final void onNftDetailChange(@NotNull qy0.b bVar) {
        if (!PatchProxy.proxy(new Object[]{bVar}, this, changeQuickRedirect, false, 251979, new Class[]{qy0.b.class}, Void.TYPE).isSupported) {
            if (bVar.a() == 2 || bVar.a() == 3 || bVar.a() == 1) {
                this.m = true;
            }
        }
    }

    @Override // androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onResume() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251976, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onResume(this);
        }
    }

    @Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onStart() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251985, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onStart(this);
        }
    }

    public final void p() {
        RollingFontTextView rollingFontTextView;
        UsersModel userInfo;
        HideInfoModel hide;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251964, new Class[0], Void.TYPE).isSupported) {
            ((DuRequestOptions) mn.a.f35714a.g("https://cdn.poizon.com/node-common/b0e6a5a3-b688-ca91-d338-1135fc51b8fd-1125-840.png").u(new NftCollectionListActivity$initHeader$1(this))).y();
            NftListModel nftListModel = k().getNftListModel();
            if (!(nftListModel == null || (userInfo = nftListModel.getUserInfo()) == null)) {
                ImageView imageView = (ImageView) _$_findCachedViewById(R.id.hideOrShowIv);
                if (imageView != null) {
                    ViewKt.setVisible(imageView, Intrinsics.areEqual(k().getUserId(), ServiceManager.d().getUserId()));
                }
                NftCollectionListViewModel k6 = k();
                NftListModel nftListModel2 = k().getNftListModel();
                k6.setHideList((nftListModel2 == null || (hide = nftListModel2.getHide()) == null || hide.isHide() != 1) ? false : true);
                if (!k().isHideList()) {
                    ImageView imageView2 = (ImageView) _$_findCachedViewById(R.id.hideOrShowIv);
                    if (imageView2 != null) {
                        imageView2.setImageResource(R.drawable.icon_personal_nft_list_hide);
                    }
                } else {
                    ImageView imageView3 = (ImageView) _$_findCachedViewById(R.id.hideOrShowIv);
                    if (imageView3 != null) {
                        imageView3.setImageResource(R.drawable.icon_personal_nft_list_show);
                    }
                }
                AvatarView.f((AvatarView) _$_findCachedViewById(R.id.avatarIv), userInfo, fi.b.b((float) 20), 0, 0, 0, 0, false, false, Color.parseColor("#11FEFF"), n.b(Double.valueOf(0.5d)), Boolean.TRUE, 60);
                TextView textView = (TextView) _$_findCachedViewById(R.id.userName);
                if (textView != null) {
                    textView.setText(userInfo.userName);
                }
            }
            NftListModel nftListModel3 = k().getNftListModel();
            if (nftListModel3 != null) {
                RollingFontTextView rollingFontTextView2 = (RollingFontTextView) _$_findCachedViewById(R.id.numTv);
                if (rollingFontTextView2 != null) {
                    rollingFontTextView2.setText(String.valueOf(nftListModel3.getNum() - nftListModel3.getNewNum()));
                }
                if (nftListModel3.getNewNum() > 0 && (rollingFontTextView = (RollingFontTextView) _$_findCachedViewById(R.id.numTv)) != null) {
                    rollingFontTextView.setTextByRolling(String.valueOf(nftListModel3.getNum()));
                }
                ShapeView shapeView = (ShapeView) _$_findCachedViewById(R.id.redPoint);
                if (shapeView != null) {
                    ViewKt.setVisible(shapeView, nftListModel3.getRedPoint());
                }
            }
            String str = this.f21295c;
            if ((str == null || str.length() == 0) || !(!gg0.n.t(this.f21295c))) {
                TextView textView2 = (TextView) _$_findCachedViewById(R.id.shop);
                if (textView2 != null) {
                    ViewKt.setVisible(textView2, false);
                }
                ImageView imageView4 = (ImageView) _$_findCachedViewById(R.id.menuIv);
                if (imageView4 != null) {
                    ViewKt.setVisible(imageView4, true);
                    return;
                }
                return;
            }
            TextView textView3 = (TextView) _$_findCachedViewById(R.id.shop);
            if (textView3 != null) {
                ViewKt.setVisible(textView3, true);
            }
            ImageView imageView5 = (ImageView) _$_findCachedViewById(R.id.menuIv);
            if (imageView5 != null) {
                ViewKt.setVisible(imageView5, false);
            }
        }
    }

    public final void q() {
        GuideInfoModel guideInfo;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251973, new Class[0], Void.TYPE).isSupported) {
            o(false);
            PlaceholderLayout placeholderLayout = (PlaceholderLayout) _$_findCachedViewById(R.id.placeholderLayout);
            NftListModel nftListModel = k().getNftListModel();
            String title = (nftListModel == null || (guideInfo = nftListModel.getGuideInfo()) == null) ? null : guideInfo.getTitle();
            if (title == null) {
                title = "";
            }
            PlaceholderLayout.i(placeholderLayout, 0, null, title, null, 11);
            TextView textView = (TextView) ((PlaceholderLayout) _$_findCachedViewById(R.id.placeholderLayout)).findViewById(R.id.emptyBt);
            if (textView != null) {
                ViewKt.setVisible(textView, true);
            }
            TextView textView2 = (TextView) ((PlaceholderLayout) _$_findCachedViewById(R.id.placeholderLayout)).findViewById(R.id.emptyBt);
            if (textView2 != null) {
                textView2.setText("暂无藏品");
            }
            AppCompatImageView appCompatImageView = (AppCompatImageView) ((PlaceholderLayout) _$_findCachedViewById(R.id.placeholderLayout)).findViewById(R.id.emptyArrow);
            if (appCompatImageView != null) {
                ViewKt.setVisible(appCompatImageView, false);
            }
        }
    }

    public final void r() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 251975, new Class[0], Void.TYPE).isSupported) {
            o(true);
            ((PlaceholderLayout) _$_findCachedViewById(R.id.placeholderLayout)).k(new NftCollectionListActivity$showDataError$1(this));
        }
    }

    public final void s(NftListModel nftListModel) {
        ArrayList arrayList;
        ArrayList arrayList2;
        List<NftItemModel> list;
        List<NftItemModel> list2;
        if (!PatchProxy.proxy(new Object[]{nftListModel}, this, changeQuickRedirect, false, 251963, new Class[]{NftListModel.class}, Void.TYPE).isSupported) {
            p();
            if (nftListModel == null || (list2 = nftListModel.getList()) == null) {
                arrayList = null;
            } else {
                arrayList = new ArrayList();
                for (T t : list2) {
                    if (!t.isNew()) {
                        arrayList.add(t);
                    }
                }
            }
            if (nftListModel == null || (list = nftListModel.getList()) == null) {
                arrayList2 = null;
            } else {
                arrayList2 = new ArrayList();
                for (T t4 : list) {
                    if (t4.isNew()) {
                        arrayList2.add(t4);
                    }
                }
            }
            i().setItemsSafely(arrayList);
            if (t20.c.a(arrayList2)) {
                f.i(LifecycleOwnerKt.getLifecycleScope(this), null, null, new NftCollectionListActivity$splitOnlyFirstPage$1(this, arrayList2, null), 3, null);
            }
        }
    }
}