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


package com.shizhuang.duapp.modules.du_trend_details.column.fragement;

import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Bundle;
import android.os.SystemClock;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.core.view.ViewKt;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.vlayout.VirtualLayoutManager;
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.meizu.cloud.pushsdk.constants.PushConstants;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.bean.UsersModel;
import com.shizhuang.duapp.common.event.FollowUserSyncEvent;
import com.shizhuang.duapp.common.exposure.DuExposureHelper;
import com.shizhuang.duapp.common.exposure.DuPartialItemExposureHelper;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.common.extension.ViewModelLifecycleAwareLazy;
import com.shizhuang.duapp.common.helper.LoginHelper;
import com.shizhuang.duapp.common.helper.loadmore.LoadMoreHelper;
import com.shizhuang.duapp.common.recyclerview.adapter.DuDelegateAdapter;
import com.shizhuang.duapp.common.ui.BaseFragment;
import com.shizhuang.duapp.common.utils.PreLoadUtil;
import com.shizhuang.duapp.common.utils.WaterMarkUtil;
import com.shizhuang.duapp.common.utils.screenshot.ScreenShotUtils;
import com.shizhuang.duapp.common.widget.shapeview.ShapeView;
import com.shizhuang.duapp.libs.bpm.BM;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.statemanager.ProgressWheel;
import com.shizhuang.duapp.modules.du_community_common.bean.FeedExcessBean;
import com.shizhuang.duapp.modules.du_community_common.bean.ForumPostCacheData;
import com.shizhuang.duapp.modules.du_community_common.helper.CommunityCommonHelper;
import com.shizhuang.duapp.modules.du_community_common.helper.PushTipManager;
import com.shizhuang.duapp.modules.du_community_common.manager.LikeIconResManager;
import com.shizhuang.duapp.modules.du_community_common.model.CommunityFeedContentModel;
import com.shizhuang.duapp.modules.du_community_common.model.CommunityFeedLabelModel;
import com.shizhuang.duapp.modules.du_community_common.model.CommunityFeedModel;
import com.shizhuang.duapp.modules.du_community_common.model.CommunityFeedProductModel;
import com.shizhuang.duapp.modules.du_community_common.model.CommunityFeedSecModel;
import com.shizhuang.duapp.modules.du_community_common.model.CommunityFeedTrendTagModel;
import com.shizhuang.duapp.modules.du_community_common.model.CommunityListItemModel;
import com.shizhuang.duapp.modules.du_community_common.model.trend.CommunityAnchorReplyModel;
import com.shizhuang.duapp.modules.du_community_common.model.trend.CommunityReplyItemModel;
import com.shizhuang.duapp.modules.du_community_common.model.trend.CommunityReplyListModel;
import com.shizhuang.duapp.modules.du_community_common.model.trend.TrendDetailsModel;
import com.shizhuang.duapp.modules.du_community_common.viewmodel.TrendProductConfigViewModel;
import com.shizhuang.duapp.modules.du_trend_details.column.ForumPostDetailsActivity;
import com.shizhuang.duapp.modules.du_trend_details.column.adapter.ForumDetailsAdapter;
import com.shizhuang.duapp.modules.du_trend_details.column.adapter.ForumLabelCircleAdapter;
import com.shizhuang.duapp.modules.du_trend_details.column.controller.FormPostBottomController$updateBottom$1;
import com.shizhuang.duapp.modules.du_trend_details.column.controller.FormPostBottomController$updateBottom$2;
import com.shizhuang.duapp.modules.du_trend_details.column.controller.FormPostDetailsController$showPlaceHolderView$$inlined$apply$lambda$1;
import com.shizhuang.duapp.modules.du_trend_details.column.controller.FormPostDetailsController$startGuideLikeAnimation$2$1;
import com.shizhuang.duapp.modules.du_trend_details.column.controller.FormPostTopController;
import com.shizhuang.duapp.modules.du_trend_details.column.parser.ForumHtmlParser;
import com.shizhuang.duapp.modules.du_trend_details.column.parser.HtmlSection;
import com.shizhuang.duapp.modules.du_trend_details.comment.adapter.OneCommentAdapter;
import com.shizhuang.duapp.modules.du_trend_details.trend.adapter.DissLabelAdapter;
import com.shizhuang.duapp.modules.du_trend_details.trend.adapter.EmptyFooterAdapter;
import com.shizhuang.duapp.modules.du_trend_details.trend.adapter.SingleEmptyAdapter;
import com.shizhuang.duapp.modules.du_trend_details.trend.adapter.SingleQuickAdapter;
import com.shizhuang.duapp.modules.du_trend_details.trend.adapter.TrendLightAdapter;
import com.shizhuang.duapp.modules.du_trend_details.trend.api.TrendDetailsApi;
import com.shizhuang.duapp.modules.du_trend_details.trend.api.TrendDetailsFacade;
import com.shizhuang.duapp.modules.du_trend_details.trend.helper.AdminHelper;
import com.shizhuang.duapp.modules.du_trend_details.trend.helper.FeedDetailsHelper;
import com.shizhuang.duapp.modules.du_trend_details.trend.manager.TrendAdminManager;
import com.shizhuang.duapp.modules.du_trend_details.trend.model.DissLabelModel;
import com.shizhuang.duapp.modules.du_trend_details.trend.utils.FeedDetailsTrackUtil;
import com.shizhuang.duapp.modules.du_trend_details.trend.viewmodel.CommentNpsViewModel;
import com.shizhuang.duapp.photoviewer.PhotoPageBuilder;
import df.b0;
import df.r0;
import df.u0;
import fd.g0;
import gg0.n;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.TimeUnit;
import kotlin.Lazy;
import kotlin.Metadata;
import kotlin.TuplesKt;
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.Function3;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

@Metadata(bv = {}, d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\u0018\u00002\u00020\u0001:\u0001\rB\u0007¢\u0006\u0004\b\u000b\u0010\fJ\b\u0010\u0003\u001a\u00020\u0002H\u0016J\b\u0010\u0004\u001a\u00020\u0002H\u0016J\u0010\u0010\u0007\u001a\u00020\u00022\u0006\u0010\u0006\u001a\u00020\u0005H\u0007J\u0010\u0010\n\u001a\u00020\u00022\u0006\u0010\t\u001a\u00020\bH\u0007¨\u0006\u000e"}, d2 = {"Lcom/shizhuang/duapp/modules/du_trend_details/column/fragement/ForumPostDetailsFragment;", "Lcom/shizhuang/duapp/common/ui/BaseFragment;", "", "onResume", "onPause", "Lcom/shizhuang/duapp/common/event/FollowUserSyncEvent;", "followUserSyncEvent", "syncFollowChanged", "Lr20/f;", "detailEvent", "pushTipChanged", "<init>", "()V", "a", "du_trend_details_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: ForumPostDetailsFragment.kt */
public final class ForumPostDetailsFragment extends BaseFragment {
    @NotNull
    public static final a Q = new a(null);
    public static ChangeQuickRedirect changeQuickRedirect;
    public Disposable A;
    public TrendDetailsModel B;
    public CommunityReplyListModel C;
    public FormPostTopController D;
    public s80.d E;
    public s80.a F;
    public final Lazy G = new ViewModelLifecycleAwareLazy(this, new ForumPostDetailsFragment$$special$$inlined$duViewModel$1(this));
    public final Lazy H = new ViewModelLifecycleAwareLazy(this, new ForumPostDetailsFragment$$special$$inlined$duViewModel$2(this));
    public boolean I;
    public boolean J;
    public boolean K;
    public boolean L;
    public boolean M;
    public ArrayList<HtmlSection> N = new ArrayList<>();
    @NotNull
    public ArrayList<CommunityFeedProductModel> O = new ArrayList<>();
    public HashMap P;
    @NotNull
    public String b = "0";

    /* renamed from: c  reason: collision with root package name */
    public final int f14278c = 3;
    @NotNull
    public FeedExcessBean d = new FeedExcessBean(0, 0, 0, null, null, 0, null, null, null, 0, null, 0, 0, false, null, null, null, 0, 0, 0, null, 0, null, null, null, null, null, 0, false, 0, 0, 0, 0, 0, 0, 0, false, 0, false, 0, false, 0, 0, 0, null, 0, 0, -1, 32767, null);
    @NotNull
    public String e = "";
    @Nullable
    public CommunityListItemModel f;

    /* renamed from: g  reason: collision with root package name */
    public VirtualLayoutManager f14279g;

    /* renamed from: h  reason: collision with root package name */
    public DuDelegateAdapter f14280h;
    public ForumDetailsAdapter i;
    public ForumLabelCircleAdapter j;
    @NotNull
    public final TrendLightAdapter k = new TrendLightAdapter(24, 0);
    @NotNull
    public final SingleQuickAdapter l = new SingleQuickAdapter();
    public DissLabelAdapter m;
    public final SingleEmptyAdapter n = new SingleEmptyAdapter();
    public OneCommentAdapter o;
    public DuExposureHelper p;

    /* renamed from: q  reason: collision with root package name */
    public DuPartialItemExposureHelper f14281q;
    public LoadMoreHelper r;
    @NotNull
    public EmptyFooterAdapter s = new EmptyFooterAdapter();
    public ArrayList<String> t = new ArrayList<>();

    /* renamed from: u  reason: collision with root package name */
    public ArrayList<v80.e> f14282u = new ArrayList<>();

    /* renamed from: v  reason: collision with root package name */
    public int f14283v;
    public boolean w;
    public long x = -1;
    public Disposable y;
    public Disposable 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(ForumPostDetailsFragment forumPostDetailsFragment, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{forumPostDetailsFragment, bundle}, null, changeQuickRedirect, true, 135062, new Class[]{ForumPostDetailsFragment.class, Bundle.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                ForumPostDetailsFragment.d(forumPostDetailsFragment, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (forumPostDetailsFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.du_trend_details.column.fragement.ForumPostDetailsFragment")) {
                    jn.b.f34396a.fragmentOnCreateMethod(forumPostDetailsFragment, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onCreateView")
        @Keep
        public static View FragmentMethodWeaver_onCreateView(@NonNull ForumPostDetailsFragment forumPostDetailsFragment, @androidx.annotation.Nullable LayoutInflater layoutInflater, @androidx.annotation.Nullable ViewGroup viewGroup, Bundle bundle) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{forumPostDetailsFragment, layoutInflater, viewGroup, bundle}, null, changeQuickRedirect, true, 135064, new Class[]{ForumPostDetailsFragment.class, LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
            if (proxy.isSupported) {
                return (View) proxy.result;
            }
            long currentTimeMillis = System.currentTimeMillis();
            View f = ForumPostDetailsFragment.f(forumPostDetailsFragment, layoutInflater, viewGroup, bundle);
            long currentTimeMillis2 = System.currentTimeMillis();
            if (forumPostDetailsFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.du_trend_details.column.fragement.ForumPostDetailsFragment")) {
                jn.b.f34396a.fragmentOnCreateViewMethod(forumPostDetailsFragment, 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(ForumPostDetailsFragment forumPostDetailsFragment) {
            if (!PatchProxy.proxy(new Object[]{forumPostDetailsFragment}, null, changeQuickRedirect, true, 135061, new Class[]{ForumPostDetailsFragment.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                ForumPostDetailsFragment.c(forumPostDetailsFragment);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (forumPostDetailsFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.du_trend_details.column.fragement.ForumPostDetailsFragment")) {
                    jn.b.f34396a.fragmentOnResumeMethod(forumPostDetailsFragment, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onStart")
        @Keep
        public static void FragmentMethodWeaver_onStart(ForumPostDetailsFragment forumPostDetailsFragment) {
            if (!PatchProxy.proxy(new Object[]{forumPostDetailsFragment}, null, changeQuickRedirect, true, 135063, new Class[]{ForumPostDetailsFragment.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                ForumPostDetailsFragment.e(forumPostDetailsFragment);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (forumPostDetailsFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.du_trend_details.column.fragement.ForumPostDetailsFragment")) {
                    jn.b.f34396a.fragmentOnStartMethod(forumPostDetailsFragment, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onViewCreated")
        @Keep
        public static void FragmentMethodWeaver_onViewCreated(@NonNull ForumPostDetailsFragment forumPostDetailsFragment, @androidx.annotation.Nullable View view, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{forumPostDetailsFragment, view, bundle}, null, changeQuickRedirect, true, 135065, new Class[]{ForumPostDetailsFragment.class, View.class, Bundle.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                ForumPostDetailsFragment.g(forumPostDetailsFragment, view, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (forumPostDetailsFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.du_trend_details.column.fragement.ForumPostDetailsFragment")) {
                    jn.b.f34396a.fragmentOnViewCreatedMethod(forumPostDetailsFragment, currentTimeMillis, currentTimeMillis2);
                }
            }
        }
    }

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

        public a(DefaultConstructorMarker defaultConstructorMarker) {
        }
    }

    /* compiled from: ForumPostDetailsFragment.kt */
    public static final class b<T, R> implements Function<Integer, Unit> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ForumPostDetailsFragment b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ ForumPostCacheData f14284c;

        public b(ForumPostDetailsFragment forumPostDetailsFragment, ForumPostCacheData forumPostCacheData) {
            this.b = forumPostDetailsFragment;
            this.f14284c = forumPostCacheData;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // io.reactivex.functions.Function
        public Unit apply(Integer num) {
            if (!PatchProxy.proxy(new Object[]{num}, this, changeQuickRedirect, false, 135067, new Class[]{Integer.class}, Void.TYPE).isSupported) {
                ForumPostDetailsFragment forumPostDetailsFragment = this.b;
                ForumPostCacheData forumPostCacheData = this.f14284c;
                forumPostDetailsFragment.x(forumPostCacheData.content, forumPostCacheData.title);
            }
            return Unit.INSTANCE;
        }
    }

    /* compiled from: ForumPostDetailsFragment.kt */
    public static final class c<T> implements Consumer<Unit> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ForumPostDetailsFragment b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ ForumPostCacheData f14285c;

        public c(ForumPostDetailsFragment forumPostDetailsFragment, ForumPostCacheData forumPostCacheData) {
            this.b = forumPostDetailsFragment;
            this.f14285c = forumPostCacheData;
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // io.reactivex.functions.Consumer
        public void accept(Unit unit) {
            if (!PatchProxy.proxy(new Object[]{unit}, this, changeQuickRedirect, false, 135068, new Class[]{Unit.class}, Void.TYPE).isSupported && nq.b.e(this.b)) {
                ((ProgressWheel) this.b._$_findCachedViewById(R.id.plLoading)).setVisibility(8);
                this.b.w(this.f14285c.getUserName());
                this.b.A();
                ForumPostDetailsFragment forumPostDetailsFragment = this.b;
                if (!forumPostDetailsFragment.M) {
                    forumPostDetailsFragment.M = true;
                    forumPostDetailsFragment.y();
                }
                ForumPostDetailsFragment forumPostDetailsFragment2 = this.b;
                forumPostDetailsFragment2.K = true;
                if (forumPostDetailsFragment2.L) {
                    forumPostDetailsFragment2.j();
                }
            }
        }
    }

    /* compiled from: ForumPostDetailsFragment.kt */
    public static final class d<T> implements Consumer<Throwable> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ForumPostDetailsFragment b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ ForumPostCacheData f14286c;

        public d(ForumPostDetailsFragment forumPostDetailsFragment, ForumPostCacheData forumPostCacheData) {
            this.b = forumPostDetailsFragment;
            this.f14286c = forumPostCacheData;
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // io.reactivex.functions.Consumer
        public void accept(Throwable th2) {
            Throwable th3 = th2;
            if (!PatchProxy.proxy(new Object[]{th3}, this, changeQuickRedirect, false, 135069, new Class[]{Throwable.class}, Void.TYPE).isSupported && nq.b.e(this.b)) {
                HashMap n = gy.a.n("describe", "专栏详情页解析html失败");
                n.put(PushConstants.CONTENT, this.f14286c.content);
                String message = th3.getMessage();
                if (message == null) {
                    message = "";
                }
                n.put("error", message);
                BM.community().c("app_forum_posts_parse", n);
                this.b.K = true;
            }
        }
    }

    /* compiled from: ForumPostDetailsFragment.kt */
    public static final class e<T, R> implements Function<TrendDetailsModel, TrendDetailsModel> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ForumPostDetailsFragment b;

        public e(ForumPostDetailsFragment forumPostDetailsFragment) {
            this.b = forumPostDetailsFragment;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // io.reactivex.functions.Function
        public TrendDetailsModel apply(TrendDetailsModel trendDetailsModel) {
            TrendDetailsModel trendDetailsModel2 = trendDetailsModel;
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{trendDetailsModel2}, this, changeQuickRedirect, false, 135070, new Class[]{TrendDetailsModel.class}, TrendDetailsModel.class);
            if (proxy.isSupported) {
                return (TrendDetailsModel) proxy.result;
            }
            CommunityFeedModel detail = trendDetailsModel2.getDetail();
            if (detail == null) {
                return trendDetailsModel2;
            }
            ForumPostDetailsFragment forumPostDetailsFragment = this.b;
            if (forumPostDetailsFragment.I) {
                return trendDetailsModel2;
            }
            String content = detail.getContent().getContent();
            String str = "";
            if (content == null) {
                content = str;
            }
            String title = detail.getContent().getTitle();
            if (title != null) {
                str = title;
            }
            forumPostDetailsFragment.x(content, str);
            return trendDetailsModel2;
        }
    }

    /* compiled from: ForumPostDetailsFragment.kt */
    public static final class f<T> implements Consumer<TrendDetailsModel> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ForumPostDetailsFragment b;

        public f(ForumPostDetailsFragment forumPostDetailsFragment) {
            this.b = forumPostDetailsFragment;
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // io.reactivex.functions.Consumer
        public void accept(TrendDetailsModel trendDetailsModel) {
            CommunityFeedModel communityFeedModel;
            String str;
            CommunityFeedModel detail;
            CommunityFeedModel detail2;
            CommunityFeedContentModel content;
            CommunityFeedLabelModel label;
            TrendDetailsModel trendDetailsModel2 = trendDetailsModel;
            if (!PatchProxy.proxy(new Object[]{trendDetailsModel2}, this, changeQuickRedirect, false, 135071, new Class[]{TrendDetailsModel.class}, Void.TYPE).isSupported) {
                ForumPostDetailsFragment forumPostDetailsFragment = this.b;
                forumPostDetailsFragment.B = trendDetailsModel2;
                TrendProductConfigViewModel r = forumPostDetailsFragment.r();
                TrendDetailsModel trendDetailsModel3 = this.b.B;
                if (trendDetailsModel3 == null || (communityFeedModel = trendDetailsModel3.getDetail()) == null) {
                    communityFeedModel = new CommunityFeedModel(null, null, null, null, null, null, false, 0, 0, false, false, false, null, null, 16383, null);
                }
                r.setForumFeedModel(communityFeedModel);
                TrendProductConfigViewModel r12 = this.b.r();
                TrendDetailsModel trendDetailsModel4 = this.b.B;
                r12.setForumProductModelList((trendDetailsModel4 == null || (detail2 = trendDetailsModel4.getDetail()) == null || (content = detail2.getContent()) == null || (label = content.getLabel()) == null) ? null : label.getSpuList());
                TrendProductConfigViewModel r13 = this.b.r();
                TrendDetailsModel trendDetailsModel5 = this.b.B;
                if (trendDetailsModel5 == null || (detail = trendDetailsModel5.getDetail()) == null || (str = detail.getUserId()) == null) {
                    str = "";
                }
                r13.setForumAuthorId(str);
                if (nq.b.e(this.b)) {
                    ForumPostDetailsFragment forumPostDetailsFragment2 = this.b;
                    if (!forumPostDetailsFragment2.M) {
                        forumPostDetailsFragment2.M = true;
                        forumPostDetailsFragment2.y();
                    }
                    if (this.b.i()) {
                        this.b.j();
                    }
                }
            }
        }
    }

    /* compiled from: ForumPostDetailsFragment.kt */
    public static final class g<T> implements Consumer<Throwable> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ForumPostDetailsFragment b;

        public g(ForumPostDetailsFragment forumPostDetailsFragment) {
            this.b = forumPostDetailsFragment;
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // io.reactivex.functions.Consumer
        public void accept(Throwable th2) {
            Throwable th3 = th2;
            if (PatchProxy.proxy(new Object[]{th3}, this, changeQuickRedirect, false, 135072, new Class[]{Throwable.class}, Void.TYPE).isSupported || !nq.b.e(this.b)) {
                return;
            }
            if (th3 instanceof TrendDetailsFacade.TrendNotExistException) {
                u0.a(this.b.getContext(), "动态不存在");
                FragmentActivity activity = this.b.getActivity();
                if (activity != null) {
                    activity.finish();
                }
            } else if (th3 instanceof TrendDetailsFacade.ConfirmSpiderException) {
                FragmentActivity activity2 = this.b.getActivity();
                if (activity2 != null) {
                    activity2.finish();
                }
            } else if (this.b.i()) {
                this.b.j();
            }
        }
    }

    /* compiled from: ForumPostDetailsFragment.kt */
    public static final class h<T> implements Consumer<CommunityReplyListModel> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ForumPostDetailsFragment b;

        public h(ForumPostDetailsFragment forumPostDetailsFragment) {
            this.b = forumPostDetailsFragment;
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // io.reactivex.functions.Consumer
        public void accept(CommunityReplyListModel communityReplyListModel) {
            CommunityReplyListModel communityReplyListModel2 = communityReplyListModel;
            if (!PatchProxy.proxy(new Object[]{communityReplyListModel2}, this, changeQuickRedirect, false, 135073, new Class[]{CommunityReplyListModel.class}, Void.TYPE).isSupported && nq.b.e(this.b)) {
                ForumPostDetailsFragment forumPostDetailsFragment = this.b;
                forumPostDetailsFragment.C = communityReplyListModel2;
                if (forumPostDetailsFragment.i()) {
                    this.b.j();
                }
            }
        }
    }

    /* compiled from: ForumPostDetailsFragment.kt */
    public static final class i<T> implements Consumer<Throwable> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ForumPostDetailsFragment b;

        public i(ForumPostDetailsFragment forumPostDetailsFragment) {
            this.b = forumPostDetailsFragment;
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // io.reactivex.functions.Consumer
        public void accept(Throwable th2) {
            if (!PatchProxy.proxy(new Object[]{th2}, this, changeQuickRedirect, false, 135074, new Class[]{Throwable.class}, Void.TYPE).isSupported && nq.b.e(this.b) && this.b.i()) {
                this.b.j();
            }
        }
    }

    /* compiled from: ForumPostDetailsFragment.kt */
    public static final class j implements Function3<String, View, Boolean, Unit> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ForumPostDetailsFragment b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ String f14288c;

        public j(ForumPostDetailsFragment forumPostDetailsFragment, String str) {
            this.b = forumPostDetailsFragment;
            this.f14288c = str;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function3
        public Unit invoke(String str, View view, Boolean bool) {
            List<String> list;
            CommunityFeedModel feed;
            UsersModel userInfo;
            String str2 = str;
            View view2 = view;
            boolean booleanValue = bool.booleanValue();
            if (!PatchProxy.proxy(new Object[]{str2, view2, new Byte(booleanValue ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 135075, new Class[]{String.class, View.class, Boolean.TYPE}, Void.TYPE).isSupported && ((RecyclerView) this.b._$_findCachedViewById(R.id.recyclerView)) != null) {
                String str3 = this.f14288c;
                if (str3.length() == 0) {
                    CommunityListItemModel p = this.b.p();
                    String str4 = (p == null || (feed = p.getFeed()) == null || (userInfo = feed.getUserInfo()) == null) ? null : userInfo.userName;
                    if (str4 != null) {
                        str3 = str4;
                    }
                }
                WaterMarkUtil.b.c((RecyclerView) this.b._$_findCachedViewById(R.id.recyclerView), str3);
                if (!booleanValue) {
                    PhotoPageBuilder photoPageBuilder = new PhotoPageBuilder(this.b.t);
                    ForumPostDetailsFragment forumPostDetailsFragment = this.b;
                    int measuredWidth = view2.getMeasuredWidth();
                    int measuredHeight = view2.getMeasuredHeight();
                    Object[] objArr = {new Integer(measuredWidth), new Integer(measuredHeight)};
                    ChangeQuickRedirect changeQuickRedirect2 = ForumPostDetailsFragment.changeQuickRedirect;
                    Class cls = Integer.TYPE;
                    PatchProxyResult proxy = PatchProxy.proxy(objArr, forumPostDetailsFragment, changeQuickRedirect2, false, 135038, new Class[]{cls, cls}, List.class);
                    if (proxy.isSupported) {
                        list = (List) proxy.result;
                    } else {
                        ArrayList arrayList = new ArrayList();
                        Iterator<String> it2 = forumPostDetailsFragment.t.iterator();
                        while (it2.hasNext()) {
                            arrayList.add(mn.a.f35714a.c(it2.next(), measuredWidth, measuredHeight, false));
                        }
                        list = arrayList;
                    }
                    photoPageBuilder.q(list);
                    photoPageBuilder.m(view2);
                    photoPageBuilder.j(view2.getMeasuredWidth(), view2.getMeasuredHeight());
                    photoPageBuilder.k(this.b.t.indexOf(str2));
                    Context context = this.b.getContext();
                    if (context != null) {
                        photoPageBuilder.v(context, this.b.getViewLifecycleOwner(), true, ForumPostDetailsFragment$handlerHtmlData$1$invoke$1$1.INSTANCE);
                    }
                } else {
                    u91.e.M0(this.b.getContext(), g0.c(this.b.t), this.b.t.indexOf(str2));
                }
            }
            return Unit.INSTANCE;
        }
    }

    /* compiled from: ForumPostDetailsFragment.kt */
    public static final class k implements Function1<MotionEvent, Unit> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ForumPostDetailsFragment b;

        /* JADX WARN: Incorrect args count in method signature: ()V */
        public k(ForumPostDetailsFragment forumPostDetailsFragment) {
            this.b = forumPostDetailsFragment;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kotlin.jvm.functions.Function1
        public Unit invoke(MotionEvent motionEvent) {
            MotionEvent motionEvent2 = motionEvent;
            if (!PatchProxy.proxy(new Object[]{motionEvent2}, this, changeQuickRedirect, false, 135077, new Class[]{MotionEvent.class}, Void.TYPE).isSupported) {
                LoginHelper.f(this.b.getContext(), LoginHelper.LoginTipsType.TYPE_LIKE, new a(this, motionEvent2));
            }
            return Unit.INSTANCE;
        }
    }

    public static void c(ForumPostDetailsFragment forumPostDetailsFragment) {
        CommunityFeedModel feed;
        UsersModel userInfo;
        if (!PatchProxy.proxy(new Object[0], forumPostDetailsFragment, changeQuickRedirect, false, 135026, new Class[0], Void.TYPE).isSupported) {
            super.onResume();
            FormPostTopController formPostTopController = forumPostDetailsFragment.D;
            if (formPostTopController == null) {
                Intrinsics.throwUninitializedPropertyAccessException("topController");
            }
            if (!PatchProxy.proxy(new Object[0], formPostTopController, FormPostTopController.changeQuickRedirect, false, 134954, new Class[0], Void.TYPE).isSupported) {
                formPostTopController.f14274c.d();
                if (formPostTopController.e || !formPostTopController.d) {
                    formPostTopController.e = false;
                } else {
                    CommunityListItemModel p12 = formPostTopController.f14275g.p();
                    if (!(p12 == null || (feed = p12.getFeed()) == null || (userInfo = feed.getUserInfo()) == null)) {
                        formPostTopController.g(userInfo);
                    }
                }
            }
            FeedDetailsTrackUtil feedDetailsTrackUtil = FeedDetailsTrackUtil.f14690a;
            String str = forumPostDetailsFragment.b;
            int i3 = forumPostDetailsFragment.f14278c;
            int sourcePage = forumPostDetailsFragment.d.getSourcePage();
            FeedDetailsHelper feedDetailsHelper = FeedDetailsHelper.f14672a;
            FeedDetailsTrackUtil.o(feedDetailsTrackUtil, str, i3, sourcePage, 0, feedDetailsHelper.l(forumPostDetailsFragment.getContext()), feedDetailsHelper.m(forumPostDetailsFragment.getContext()), null, null, 192);
            FragmentActivity activity = forumPostDetailsFragment.getActivity();
            if (activity != null) {
                r0.s(activity, true);
            }
        }
    }

    public static void d(ForumPostDetailsFragment forumPostDetailsFragment, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, forumPostDetailsFragment, changeQuickRedirect, false, 135051, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onCreate(bundle);
        }
    }

    public static void e(ForumPostDetailsFragment forumPostDetailsFragment) {
        if (!PatchProxy.proxy(new Object[0], forumPostDetailsFragment, changeQuickRedirect, false, 135053, new Class[0], Void.TYPE).isSupported) {
            super.onStart();
        }
    }

    public static View f(ForumPostDetailsFragment forumPostDetailsFragment, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, forumPostDetailsFragment, changeQuickRedirect, false, 135055, 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(ForumPostDetailsFragment forumPostDetailsFragment, View view, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{view, bundle}, forumPostDetailsFragment, changeQuickRedirect, false, 135057, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
            super.onViewCreated(view, bundle);
        }
    }

    public static final /* synthetic */ s80.a h(ForumPostDetailsFragment forumPostDetailsFragment) {
        s80.a aVar = forumPostDetailsFragment.F;
        if (aVar == null) {
            Intrinsics.throwUninitializedPropertyAccessException("bottomController");
        }
        return aVar;
    }

    public final void A() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135040, new Class[0], Void.TYPE).isSupported && !this.w) {
            this.w = true;
            BM.community().a("community_specialColumn_load_html_elapsedTime", SystemClock.elapsedRealtime() - this.x, false);
        }
    }

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

    @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, 135019, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.du_trend_detail_fragment_forum_detail;
    }

    public final boolean i() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135031, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        int i3 = this.f14283v + 1;
        this.f14283v = i3;
        boolean z4 = i3 == 2;
        if (!z4 || !this.I || this.K) {
            return z4;
        }
        this.L = true;
        return false;
    }

    @Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
    public void initData() {
        Context context;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135023, new Class[0], Void.TYPE).isSupported) {
            this.p = new DuExposureHelper(this, null, false, 6);
            DuPartialItemExposureHelper duPartialItemExposureHelper = new DuPartialItemExposureHelper(this, null, 2);
            this.f14281q = duPartialItemExposureHelper;
            duPartialItemExposureHelper.j(fi.b.b(50.0f));
            DuPartialItemExposureHelper duPartialItemExposureHelper2 = this.f14281q;
            if (duPartialItemExposureHelper2 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("partialItemExposureHelper");
            }
            duPartialItemExposureHelper2.k(ForumPostDetailsFragment$initData$1.INSTANCE);
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135024, new Class[0], Void.TYPE).isSupported && (context = getContext()) != null) {
                VirtualLayoutManager virtualLayoutManager = new VirtualLayoutManager(context);
                this.f14279g = virtualLayoutManager;
                this.f14280h = new DuDelegateAdapter(virtualLayoutManager);
                ((RecyclerView) _$_findCachedViewById(R.id.recyclerView)).setAnimation(null);
                RecyclerView recyclerView = (RecyclerView) _$_findCachedViewById(R.id.recyclerView);
                VirtualLayoutManager virtualLayoutManager2 = this.f14279g;
                if (virtualLayoutManager2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("virtualLayoutManager");
                }
                recyclerView.setLayoutManager(virtualLayoutManager2);
                this.i = new ForumDetailsAdapter(this);
                DuDelegateAdapter duDelegateAdapter = this.f14280h;
                if (duDelegateAdapter == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                }
                ForumDetailsAdapter forumDetailsAdapter = this.i;
                if (forumDetailsAdapter == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("forumDetailsAdapter");
                }
                duDelegateAdapter.addAdapter(forumDetailsAdapter);
                this.j = new ForumLabelCircleAdapter(this.d.getSourcePage());
                DuDelegateAdapter duDelegateAdapter2 = this.f14280h;
                if (duDelegateAdapter2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                }
                ForumLabelCircleAdapter forumLabelCircleAdapter = this.j;
                if (forumLabelCircleAdapter == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("labelCircleAdapter");
                }
                duDelegateAdapter2.addAdapter(forumLabelCircleAdapter);
                DuDelegateAdapter duDelegateAdapter3 = this.f14280h;
                if (duDelegateAdapter3 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                }
                duDelegateAdapter3.addAdapter(this.k);
                DuDelegateAdapter duDelegateAdapter4 = this.f14280h;
                if (duDelegateAdapter4 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                }
                DuExposureHelper duExposureHelper = this.p;
                if (duExposureHelper == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("exposureHelper");
                }
                duDelegateAdapter4.setExposureHelper(duExposureHelper, null);
                DuDelegateAdapter duDelegateAdapter5 = this.f14280h;
                if (duDelegateAdapter5 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                }
                duDelegateAdapter5.uploadSensorExposure(true);
                DuDelegateAdapter duDelegateAdapter6 = this.f14280h;
                if (duDelegateAdapter6 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                }
                DuPartialItemExposureHelper duPartialItemExposureHelper3 = this.f14281q;
                if (duPartialItemExposureHelper3 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("partialItemExposureHelper");
                }
                duDelegateAdapter6.setPartialExposureHelper(duPartialItemExposureHelper3);
                e90.a aVar = e90.a.f31758a;
                SingleQuickAdapter singleQuickAdapter = this.l;
                aVar.b(singleQuickAdapter, singleQuickAdapter, getContext(), this.d.getSourcePage(), new ForumPostDetailsFragment$initRecyclerView$1(this), ForumPostDetailsFragment$initRecyclerView$2.INSTANCE);
                DuDelegateAdapter duDelegateAdapter7 = this.f14280h;
                if (duDelegateAdapter7 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                }
                duDelegateAdapter7.addAdapter(this.l);
                DissLabelAdapter dissLabelAdapter = new DissLabelAdapter(24, this.b, this.f14278c);
                this.m = dissLabelAdapter;
                dissLabelAdapter.addItemChildClickViewIds(R.id.diss_close_image);
                dissLabelAdapter.setOnItemChildClickListener(new ForumPostDetailsFragment$initRecyclerView$$inlined$apply$lambda$1(dissLabelAdapter, this));
                DuDelegateAdapter duDelegateAdapter8 = this.f14280h;
                if (duDelegateAdapter8 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                }
                DissLabelAdapter dissLabelAdapter2 = this.m;
                if (dissLabelAdapter2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("dissLabelAdapter");
                }
                duDelegateAdapter8.addAdapter(dissLabelAdapter2);
                aVar.b(this.n, this.l, getContext(), this.d.getSourcePage(), new ForumPostDetailsFragment$initRecyclerView$4(this), ForumPostDetailsFragment$initRecyclerView$5.INSTANCE);
                DuDelegateAdapter duDelegateAdapter9 = this.f14280h;
                if (duDelegateAdapter9 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                }
                duDelegateAdapter9.addAdapter(this.n);
                OneCommentAdapter oneCommentAdapter = new OneCommentAdapter(this, this.d.getAnchorReplyId(), 24, this.b, this.f14278c, "ForumPostDetailsFragment", false, 64);
                this.o = oneCommentAdapter;
                aVar.c(oneCommentAdapter, this.l, this, this.d.getSourcePage(), new ForumPostDetailsFragment$initRecyclerView$6(this), new ForumPostDetailsFragment$initRecyclerView$7(this));
                DuDelegateAdapter duDelegateAdapter10 = this.f14280h;
                if (duDelegateAdapter10 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                }
                OneCommentAdapter oneCommentAdapter2 = this.o;
                if (oneCommentAdapter2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("replyAdapter");
                }
                duDelegateAdapter10.addAdapter(oneCommentAdapter2);
                DuDelegateAdapter duDelegateAdapter11 = this.f14280h;
                if (duDelegateAdapter11 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                }
                duDelegateAdapter11.addAdapter(this.s);
                RecyclerView recyclerView2 = (RecyclerView) _$_findCachedViewById(R.id.recyclerView);
                DuDelegateAdapter duDelegateAdapter12 = this.f14280h;
                if (duDelegateAdapter12 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                }
                recyclerView2.setAdapter(duDelegateAdapter12);
                b90.a aVar2 = b90.a.f1604a;
                DuDelegateAdapter duDelegateAdapter13 = this.f14280h;
                if (duDelegateAdapter13 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                }
                OneCommentAdapter oneCommentAdapter3 = this.o;
                if (oneCommentAdapter3 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("replyAdapter");
                }
                aVar2.m(duDelegateAdapter13, oneCommentAdapter3);
                LoadMoreHelper g3 = LoadMoreHelper.g(new t80.a(this), 6);
                this.r = g3;
                if (g3 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("loadMoreHelper");
                }
                g3.d((RecyclerView) _$_findCachedViewById(R.id.recyclerView));
                ((RecyclerView) _$_findCachedViewById(R.id.recyclerView)).setClipChildren(false);
            }
            k();
            s80.d dVar = this.E;
            if (dVar == null) {
                Intrinsics.throwUninitializedPropertyAccessException("detailsController");
            }
            if (!PatchProxy.proxy(new Object[0], dVar, s80.d.changeQuickRedirect, false, 134939, new Class[0], Void.TYPE).isSupported) {
                b30.c.b.a("ForumPostDetailsFragment", dVar.f38057h).f((RecyclerView) dVar.a(R.id.recyclerView), TuplesKt.to(Integer.valueOf((int) R.layout.du_trend_detail_item_post_detail), 1), TuplesKt.to(Integer.valueOf((int) R.layout.du_trend_detail_item_post_video), 2), TuplesKt.to(Integer.valueOf((int) R.layout.du_trend_detail_item_parent_reply1), 10), TuplesKt.to(Integer.valueOf((int) R.layout.du_trend_detail_item_comment_divider), 10), TuplesKt.to(Integer.valueOf((int) R.layout.du_trend_detail_item_child_reply1), 10)).l();
            }
        }
    }

    @Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
    public void initView(@Nullable Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 135020, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            this.x = SystemClock.elapsedRealtime();
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135021, new Class[0], Void.TYPE).isSupported && (getActivity() instanceof ForumPostDetailsActivity)) {
                ForumPostDetailsActivity forumPostDetailsActivity = (ForumPostDetailsActivity) getActivity();
                String str = forumPostDetailsActivity.d;
                if (str == null) {
                    str = "";
                }
                this.b = str;
                FeedExcessBean feedExcessBean = forumPostDetailsActivity.f14245c;
                if (feedExcessBean != null) {
                    this.d = feedExcessBean;
                }
                r().setContentId(this.b);
            }
            View view = getView();
            if (view != null) {
                this.D = new FormPostTopController(view, this);
                this.E = new s80.d(view, this);
                this.F = new s80.a(view, this);
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135022, new Class[0], Void.TYPE).isSupported) {
                ScreenShotUtils.e(this, new ForumPostDetailsFragment$initScreenShotListener$1(this));
            }
        }
    }

    public final void j() {
        CommunityFeedModel feed;
        CommunityListItemModel communityListItemModel;
        CommunityFeedModel feed2;
        UsersModel userInfo;
        CommunityFeedContentModel content;
        UsersModel userInfo2;
        CommunityFeedModel feed3;
        UsersModel userInfo3;
        List<CommunityReplyItemModel> reply;
        CommunityReplyItemModel communityReplyItemModel;
        CommunityReplyItemModel communityReplyItemModel2;
        CommunityReplyItemModel communityReplyItemModel3;
        View view;
        int i3 = 0;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135032, new Class[0], Void.TYPE).isSupported) {
            TrendDetailsModel trendDetailsModel = this.B;
            boolean z4 = true;
            if (!this.J && trendDetailsModel == null && this.C == null) {
                ((ProgressWheel) _$_findCachedViewById(R.id.plLoading)).setVisibility(8);
                this.f14283v = 0;
                s80.d dVar = this.E;
                if (dVar == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("detailsController");
                }
                ForumPostDetailsFragment$composeData$1 forumPostDetailsFragment$composeData$1 = new ForumPostDetailsFragment$composeData$1(this);
                if (!PatchProxy.proxy(new Object[]{forumPostDetailsFragment$composeData$1}, dVar, s80.d.changeQuickRedirect, false, 134943, new Class[]{Function1.class}, Void.TYPE).isSupported) {
                    View view2 = dVar.e;
                    if (view2 != null) {
                        view2.setVisibility(0);
                        return;
                    }
                    View inflate = ((ViewStub) dVar.getContainerView().findViewById(R.id.viewStubNoNetwork)).inflate();
                    dVar.e = inflate;
                    View findViewById = inflate.findViewById(R.id.networkErrorBt);
                    ViewExtensionKt.j(findViewById, 0, new FormPostDetailsController$showPlaceHolderView$$inlined$apply$lambda$1(findViewById, dVar, forumPostDetailsFragment$composeData$1), 1);
                    return;
                }
                return;
            }
            s80.d dVar2 = this.E;
            if (dVar2 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("detailsController");
            }
            if (!PatchProxy.proxy(new Object[0], dVar2, s80.d.changeQuickRedirect, false, 134944, new Class[0], Void.TYPE).isSupported && (view = dVar2.e) != null) {
                ViewKt.setVisible(view, false);
            }
            ((ProgressWheel) _$_findCachedViewById(R.id.plLoading)).setVisibility(8);
            if (trendDetailsModel != null) {
                CommunityReplyListModel communityReplyListModel = this.C;
                if (communityReplyListModel == null) {
                    communityReplyListModel = new CommunityReplyListModel(0, null, null, null, 15, null);
                }
                CommunityListItemModel communityListItemModel2 = new CommunityListItemModel(null, null, 0, null, null, 0, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, 0, null, null, null, null, null, 0, false, null, 0, null, 0, false, null, null, null, false, false, null, null, 0, -1, 32767, null);
                communityListItemModel2.setFeed(trendDetailsModel.getDetail());
                communityListItemModel2.setLight(trendDetailsModel.getOwnerLightUserList());
                CommunityAnchorReplyModel anchor = communityReplyListModel.getAnchor();
                String str = null;
                CommunityReplyItemModel reply2 = anchor != null ? anchor.getReply() : null;
                if (reply2 != null) {
                    if (anchor.getLevel() == 1) {
                        reply2.setHighLight(true);
                    } else if (anchor.getLevel() == 2 && (communityReplyItemModel3 = (CommunityReplyItemModel) CollectionsKt___CollectionsKt.firstOrNull((List) reply2.getChildReplyList())) != null) {
                        communityReplyItemModel3.setHighLight(true);
                    }
                    communityReplyListModel.getList().add(0, reply2);
                }
                this.f = communityListItemModel2;
                String lastId = communityReplyListModel.getLastId();
                if (lastId == null) {
                    lastId = "";
                }
                this.e = lastId;
                List<CommunityReplyItemModel> list = communityReplyListModel.getList();
                if (!PatchProxy.proxy(new Object[]{communityListItemModel2, list}, this, changeQuickRedirect, false, 135033, new Class[]{CommunityListItemModel.class, List.class}, Void.TYPE).isSupported && (feed = communityListItemModel2.getFeed()) != null) {
                    PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135042, new Class[0], Boolean.TYPE);
                    if (proxy.isSupported) {
                        ((Boolean) proxy.result).booleanValue();
                    } else {
                        CommunityListItemModel communityListItemModel3 = this.f;
                        if (!(communityListItemModel3 == null || (reply = communityListItemModel3.getReply()) == null || (communityReplyItemModel = (CommunityReplyItemModel) CollectionsKt___CollectionsKt.firstOrNull((List) reply)) == null || communityReplyItemModel.getHighLight() || (communityReplyItemModel2 = (CommunityReplyItemModel) CollectionsKt___CollectionsKt.firstOrNull((List) communityReplyItemModel.getChildReplyList())) == null)) {
                            communityReplyItemModel2.getHighLight();
                        }
                    }
                    FormPostTopController formPostTopController = this.D;
                    if (formPostTopController == null) {
                        Intrinsics.throwUninitializedPropertyAccessException("topController");
                    }
                    if (!PatchProxy.proxy(new Object[]{feed}, formPostTopController, FormPostTopController.changeQuickRedirect, false, 134964, new Class[]{CommunityFeedModel.class}, Void.TYPE).isSupported && (userInfo3 = feed.getUserInfo()) != null) {
                        AppCompatImageView appCompatImageView = (AppCompatImageView) formPostTopController.a(R.id.ivTools);
                        AdminHelper adminHelper = AdminHelper.f14661a;
                        appCompatImageView.setVisibility(AdminHelper.f(adminHelper, formPostTopController.b, feed, false, 4) ? 0 : 8);
                        if (adminHelper.c(feed)) {
                            ((AppCompatImageView) formPostTopController.a(R.id.ivTools)).setImageResource(R.mipmap.du_trend_detail_ic_tool);
                        }
                        formPostTopController.e(feed);
                        formPostTopController.f(userInfo3);
                        ((ImageView) formPostTopController.a(R.id.ivHideTrend)).setVisibility(TrendAdminManager.b().e() && feed.getContent().isHide() == 1 ? 0 : 8);
                        FeedDetailsHelper.f14672a.B(feed, (AppCompatTextView) formPostTopController.a(R.id.tvLocation), 24);
                    }
                    s80.a aVar = this.F;
                    if (aVar == null) {
                        Intrinsics.throwUninitializedPropertyAccessException("bottomController");
                    }
                    if (!PatchProxy.proxy(new Object[]{feed}, aVar, s80.a.changeQuickRedirect, false, 134923, new Class[]{CommunityFeedModel.class}, Void.TYPE).isSupported) {
                        LikeIconResManager.d dVar3 = LikeIconResManager.f;
                        CommunityFeedTrendTagModel tag = feed.getContent().getSafeLabel().getTag();
                        LikeIconResManager.h b2 = dVar3.b(new LikeIconResManager.i.d(tag != null ? Integer.valueOf(tag.getTagId()) : null));
                        aVar.d = b2;
                        LikeIconResManager.h.d(b2, (DuImageLoaderView) aVar.a(R.id.ivBottomLike), feed.isContentLight(), null, null, 12);
                        ((TextView) aVar.a(R.id.tvBottomComment)).setText(feed.getReplyFormat());
                        ((TextView) aVar.a(R.id.tvBottomLike)).setText(feed.getLightFormat());
                        FeedDetailsHelper.G(FeedDetailsHelper.f14672a, feed, (ImageView) aVar.a(R.id.ivBottomCollection), (TextView) aVar.a(R.id.tvBottomCollection), 0, 0, 24);
                        if (n.t(feed.getUserId())) {
                            PushTipManager.f12835a.h();
                        }
                        CommunityFeedSecModel sec = feed.getSec();
                        if (t20.j.b(sec != null ? Integer.valueOf(sec.getBanReply()) : null)) {
                            TextView textView = (TextView) aVar.a(R.id.tvBottomReply);
                            CommunityFeedSecModel sec2 = feed.getSec();
                            textView.setText(sec2 != null ? sec2.getBanReplyText() : null);
                            ViewExtensionKt.j((ShapeView) aVar.a(R.id.viewComment), 0, new FormPostBottomController$updateBottom$1(feed), 1);
                            ViewExtensionKt.j(aVar.a(R.id.viewBottomComment), 0, new FormPostBottomController$updateBottom$2(feed), 1);
                        }
                    }
                    w(feed.getUsername());
                    ForumLabelCircleAdapter forumLabelCircleAdapter = this.j;
                    if (forumLabelCircleAdapter == null) {
                        Intrinsics.throwUninitializedPropertyAccessException("labelCircleAdapter");
                    }
                    forumLabelCircleAdapter.setItems(CollectionsKt__CollectionsJVMKt.listOf(communityListItemModel2));
                    if (!communityListItemModel2.getSafeLight().isEmpty()) {
                        this.k.f(this.d.isMessageLikeTrend());
                        this.k.setItems(CollectionsKt__CollectionsJVMKt.listOf(communityListItemModel2));
                    }
                    this.l.setItems(CollectionsKt__CollectionsKt.mutableListOf(communityListItemModel2));
                    if (!PatchProxy.proxy(new Object[]{communityListItemModel2}, this, changeQuickRedirect, false, 135034, new Class[]{CommunityListItemModel.class}, Void.TYPE).isSupported && (feed3 = communityListItemModel2.getFeed()) != null) {
                        boolean z5 = feed3.getSafeCounter().getReplyNum() > 0;
                        communityListItemModel = communityListItemModel2;
                        boolean C2 = FeedDetailsHelper.f14672a.C(communityListItemModel);
                        if (z5 && C2) {
                            DissLabelAdapter dissLabelAdapter = this.m;
                            if (dissLabelAdapter == null) {
                                Intrinsics.throwUninitializedPropertyAccessException("dissLabelAdapter");
                            }
                            dissLabelAdapter.setItems(CollectionsKt__CollectionsKt.mutableListOf(new DissLabelModel(null, 1, null)));
                        }
                    } else {
                        communityListItemModel = communityListItemModel2;
                    }
                    OneCommentAdapter oneCommentAdapter = this.o;
                    if (oneCommentAdapter == null) {
                        Intrinsics.throwUninitializedPropertyAccessException("replyAdapter");
                    }
                    oneCommentAdapter.g(feed.getSafeUserInfo());
                    OneCommentAdapter oneCommentAdapter2 = this.o;
                    if (oneCommentAdapter2 == null) {
                        Intrinsics.throwUninitializedPropertyAccessException("replyAdapter");
                    }
                    oneCommentAdapter2.j(this.e);
                    OneCommentAdapter oneCommentAdapter3 = this.o;
                    if (oneCommentAdapter3 == null) {
                        Intrinsics.throwUninitializedPropertyAccessException("replyAdapter");
                    }
                    b90.a aVar2 = b90.a.f1604a;
                    oneCommentAdapter3.setItems(aVar2.n(list));
                    v(feed);
                    LoadMoreHelper loadMoreHelper = this.r;
                    if (loadMoreHelper == null) {
                        Intrinsics.throwUninitializedPropertyAccessException("loadMoreHelper");
                    }
                    loadMoreHelper.b(this.e);
                    s80.d dVar4 = this.E;
                    if (dVar4 == null) {
                        Intrinsics.throwUninitializedPropertyAccessException("detailsController");
                    }
                    if (!PatchProxy.proxy(new Object[0], dVar4, s80.d.changeQuickRedirect, false, 134940, new Class[0], Void.TYPE).isSupported && !((Boolean) b0.f("first_guide_like_key", Boolean.FALSE)).booleanValue()) {
                        View view3 = dVar4.d;
                        if (view3 != null) {
                            view3.setVisibility(0);
                        } else {
                            View inflate2 = ((ViewStub) dVar4.getContainerView().findViewById(R.id.viewStubLikeGuide)).inflate();
                            dVar4.d = inflate2;
                            View findViewById2 = inflate2.findViewById(R.id.tvGuideTips);
                            View findViewById3 = inflate2.findViewById(R.id.ivGuideArrow);
                            co.c l02 = ((DuImageLoaderView) inflate2.findViewById(R.id.ivLikeAnim)).i("https://apk.poizon.com/duApp/Android_Config/Assets/resouces/du_trend_double_click_like.webp").c0(null).l0(null);
                            FormPostDetailsController$startGuideLikeAnimation$2$1 formPostDetailsController$startGuideLikeAnimation$2$1 = new FormPostDetailsController$startGuideLikeAnimation$2$1(findViewById3, findViewById2);
                            PatchProxyResult proxy2 = PatchProxy.proxy(new Object[]{formPostDetailsController$startGuideLikeAnimation$2$1}, l02, co.c.changeQuickRedirect, false, 32974, new Class[]{androidx.core.util.Consumer.class}, co.c.class);
                            if (proxy2.isSupported) {
                                l02 = (co.c) proxy2.result;
                            } else {
                                l02.A = formPostDetailsController$startGuideLikeAnimation$2$1;
                            }
                            l02.x();
                        }
                        if (!PatchProxy.proxy(new Object[0], dVar4, s80.d.changeQuickRedirect, false, 134941, new Class[0], Void.TYPE).isSupported) {
                            b0.l("first_guide_like_key", Boolean.TRUE);
                            dVar4.f = bj1.e.interval(0, 1, TimeUnit.SECONDS).map(s80.b.b).observeOn(ej1.a.c()).subscribe(new s80.c(dVar4));
                        }
                    }
                    A();
                    FeedDetailsHelper feedDetailsHelper = FeedDetailsHelper.f14672a;
                    CommunityFeedModel feed4 = communityListItemModel.getFeed();
                    feedDetailsHelper.A((feed4 == null || (userInfo2 = feed4.getUserInfo()) == null) ? null : userInfo2.icon);
                    if (!PatchProxy.proxy(new Object[]{communityListItemModel}, this, changeQuickRedirect, false, 135036, new Class[]{CommunityListItemModel.class}, Void.TYPE).isSupported && (feed2 = communityListItemModel.getFeed()) != null && (userInfo = feed2.getUserInfo()) != null && (getActivity() instanceof ForumPostDetailsActivity)) {
                        ForumPostDetailsActivity forumPostDetailsActivity = (ForumPostDetailsActivity) getActivity();
                        CommunityFeedModel feed5 = communityListItemModel.getFeed();
                        if (!(feed5 == null || (content = feed5.getContent()) == null)) {
                            str = content.getContentId();
                        }
                        forumPostDetailsActivity.k(userInfo, str);
                    }
                    if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135035, new Class[0], Void.TYPE).isSupported) {
                        if (this.d.getAnchorReplyId() != 0) {
                            OneCommentAdapter oneCommentAdapter4 = this.o;
                            if (oneCommentAdapter4 == null) {
                                Intrinsics.throwUninitializedPropertyAccessException("replyAdapter");
                            }
                            if (aVar2.j(oneCommentAdapter4)) {
                                VirtualLayoutManager virtualLayoutManager = (VirtualLayoutManager) ((RecyclerView) _$_findCachedViewById(R.id.recyclerView)).getLayoutManager();
                                DuDelegateAdapter duDelegateAdapter = this.f14280h;
                                if (duDelegateAdapter == null) {
                                    Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                                }
                                OneCommentAdapter oneCommentAdapter5 = this.o;
                                if (oneCommentAdapter5 == null) {
                                    Intrinsics.throwUninitializedPropertyAccessException("replyAdapter");
                                }
                                virtualLayoutManager.scrollToPositionWithOffset(feedDetailsHelper.f(duDelegateAdapter, oneCommentAdapter5), 0);
                            }
                        }
                        if (this.d.isMessageLikeTrend()) {
                            VirtualLayoutManager virtualLayoutManager2 = (VirtualLayoutManager) ((RecyclerView) _$_findCachedViewById(R.id.recyclerView)).getLayoutManager();
                            DuDelegateAdapter duDelegateAdapter2 = this.f14280h;
                            if (duDelegateAdapter2 == null) {
                                Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
                            }
                            virtualLayoutManager2.scrollToPositionWithOffset(feedDetailsHelper.f(duDelegateAdapter2, this.k), 0);
                        }
                    }
                    List<CommunityFeedProductModel> spuList = feed.getContent().getSafeLabel().getSpuList();
                    if (spuList != null && !spuList.isEmpty()) {
                        z4 = false;
                    }
                    if (!z4) {
                        this.O.addAll(spuList);
                        ForumDetailsAdapter forumDetailsAdapter = this.i;
                        if (forumDetailsAdapter == null) {
                            Intrinsics.throwUninitializedPropertyAccessException("forumDetailsAdapter");
                        }
                        for (Object obj : forumDetailsAdapter.getList()) {
                            int i12 = i3 + 1;
                            if (i3 < 0) {
                                CollectionsKt__CollectionsKt.throwIndexOverflow();
                            }
                            if ((((HtmlSection) obj) instanceof v80.h) && ((RecyclerView) _$_findCachedViewById(R.id.recyclerView)).findViewHolderForLayoutPosition(i3) != null) {
                                ForumDetailsAdapter forumDetailsAdapter2 = this.i;
                                if (forumDetailsAdapter2 == null) {
                                    Intrinsics.throwUninitializedPropertyAccessException("forumDetailsAdapter");
                                }
                                forumDetailsAdapter2.notifyItemChanged(i3);
                            }
                            i3 = i12;
                        }
                    }
                }
            }
        }
    }

    @SuppressLint({"CheckResult"})
    public final void k() {
        bj1.e<R> eVar;
        bj1.e<R> eVar2;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135028, new Class[0], Void.TYPE).isSupported) {
            ForumPostCacheData j12 = CommunityCommonHelper.f12820a.j();
            if (j12 != null) {
                List<CommunityFeedProductModel> list = j12.spuList;
                if (list != null) {
                    this.O.addAll(list);
                }
                FormPostTopController formPostTopController = this.D;
                if (formPostTopController == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("topController");
                }
                UsersModel usersModel = j12.userInfo;
                if (!PatchProxy.proxy(new Object[]{usersModel}, formPostTopController, FormPostTopController.changeQuickRedirect, false, 134962, new Class[]{UsersModel.class}, Void.TYPE).isSupported && usersModel != null) {
                    formPostTopController.f(usersModel);
                }
                s80.a aVar = this.F;
                if (aVar == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("bottomController");
                }
                String str = j12.replyNum;
                if (!PatchProxy.proxy(new Object[]{str}, aVar, s80.a.changeQuickRedirect, false, 134922, new Class[]{String.class}, Void.TYPE).isSupported && str != null) {
                    ((TextView) aVar.a(R.id.tvBottomComment)).setText(str);
                }
            }
            if (j12 != null && Intrinsics.areEqual(this.b, j12.contentId)) {
                if (j12.content.length() > 0) {
                    if (j12.title.length() > 0) {
                        this.I = true;
                        this.J = true;
                        TrendProductConfigViewModel r12 = r();
                        UsersModel usersModel2 = j12.userInfo;
                        String str2 = usersModel2 != null ? usersModel2.userId : null;
                        if (str2 == null) {
                            str2 = "";
                        }
                        r12.setForumAuthorId(str2);
                        this.A = bj1.e.just(1).map(new b(this, j12)).compose(pc.e.h()).subscribe(new c(this, j12), new d(this, j12));
                    }
                }
            }
            if (!this.J) {
                ((ProgressWheel) _$_findCachedViewById(R.id.plLoading)).setVisibility(0);
            }
            TrendDetailsFacade trendDetailsFacade = TrendDetailsFacade.f14569a;
            String str3 = this.b;
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{str3}, trendDetailsFacade, TrendDetailsFacade.changeQuickRedirect, false, 138012, new Class[]{String.class}, bj1.e.class);
            if (proxy.isSupported) {
                eVar = (bj1.e) proxy.result;
            } else {
                eVar = ((TrendDetailsApi) td.j.getJavaGoApi(TrendDetailsApi.class)).getTrendDetailV2(str3, "", String.valueOf(n20.a.i()), 0).map(u90.a.b);
            }
            this.y = eVar.map(new e(this)).compose(np.f.f36179a.a()).compose(pc.e.e()).subscribe(new f(this), new g(this));
            String str4 = this.b;
            String valueOf = String.valueOf(this.d.getAnchorReplyId());
            PatchProxyResult proxy2 = PatchProxy.proxy(new Object[]{str4, new Integer(3), valueOf}, trendDetailsFacade, TrendDetailsFacade.changeQuickRedirect, false, 138010, new Class[]{String.class, Integer.TYPE, String.class}, bj1.e.class);
            if (proxy2.isSupported) {
                eVar2 = (bj1.e) proxy2.result;
            } else {
                eVar2 = ((TrendDetailsApi) td.j.getJavaGoApi(TrendDetailsApi.class)).getTrendReplyList(str4, 3, valueOf, "", "", 20).map(u90.g.b);
            }
            this.z = eVar2.compose(pc.e.e()).subscribe(new h(this), new i(this));
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135029, new Class[0], Void.TYPE).isSupported && this.d.getAnchorReplyId() == 0) {
                CommentNpsViewModel l12 = l();
                String str5 = this.b;
                String userId = this.d.getUserId();
                OneCommentAdapter oneCommentAdapter = this.o;
                if (oneCommentAdapter == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("replyAdapter");
                }
                l12.fetch(str5, userId, oneCommentAdapter);
            }
        }
    }

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

    @NotNull
    public final String m() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 134989, new Class[0], String.class);
        return proxy.isSupported ? (String) proxy.result : this.b;
    }

    @NotNull
    public final DuDelegateAdapter n() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 134999, new Class[0], DuDelegateAdapter.class);
        if (proxy.isSupported) {
            return (DuDelegateAdapter) proxy.result;
        }
        DuDelegateAdapter duDelegateAdapter = this.f14280h;
        if (duDelegateAdapter == null) {
            Intrinsics.throwUninitializedPropertyAccessException("delegateAdapter");
        }
        return duDelegateAdapter;
    }

    @NotNull
    public final FeedExcessBean o() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 134991, new Class[0], FeedExcessBean.class);
        return proxy.isSupported ? (FeedExcessBean) proxy.result : this.d;
    }

    @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, 135050, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onCreate(this, bundle);
        }
    }

    @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, 135054, 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 onDestroyView() {
        HashMap hashMap;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135045, new Class[0], Void.TYPE).isSupported) {
            super.onDestroyView();
            ForumDetailsAdapter forumDetailsAdapter = this.i;
            if (forumDetailsAdapter == null) {
                Intrinsics.throwUninitializedPropertyAccessException("forumDetailsAdapter");
            }
            forumDetailsAdapter.f(null);
            ForumDetailsAdapter forumDetailsAdapter2 = this.i;
            if (forumDetailsAdapter2 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("forumDetailsAdapter");
            }
            forumDetailsAdapter2.g(null);
            s80.d dVar = this.E;
            if (dVar != null) {
                if (dVar == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("detailsController");
                }
                if (!PatchProxy.proxy(new Object[0], dVar, s80.d.changeQuickRedirect, false, 134945, new Class[0], Void.TYPE).isSupported) {
                    Disposable disposable = dVar.f;
                    if (disposable != null) {
                        disposable.dispose();
                    }
                    dVar.f = null;
                }
            }
            FormPostTopController formPostTopController = this.D;
            if (formPostTopController == null) {
                Intrinsics.throwUninitializedPropertyAccessException("topController");
            }
            formPostTopController.b();
            Disposable disposable2 = this.y;
            if (disposable2 != null) {
                disposable2.dispose();
            }
            Disposable disposable3 = this.z;
            if (disposable3 != null) {
                disposable3.dispose();
            }
            Disposable disposable4 = this.A;
            if (disposable4 != null) {
                disposable4.dispose();
            }
            CommunityCommonHelper communityCommonHelper = CommunityCommonHelper.f12820a;
            ForumPostCacheData j12 = communityCommonHelper.j();
            if (j12 != null) {
                j12.onDestroy();
            }
            communityCommonHelper.u(null);
            this.N.clear();
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135049, new Class[0], Void.TYPE).isSupported && (hashMap = this.P) != null) {
                hashMap.clear();
            }
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
    public void onPause() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135027, new Class[0], Void.TYPE).isSupported) {
            super.onPause();
            FormPostTopController formPostTopController = this.D;
            if (formPostTopController == null) {
                Intrinsics.throwUninitializedPropertyAccessException("topController");
            }
            if (!PatchProxy.proxy(new Object[0], formPostTopController, FormPostTopController.changeQuickRedirect, false, 134955, new Class[0], Void.TYPE).isSupported) {
                formPostTopController.f14274c.c();
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135043, new Class[0], Void.TYPE).isSupported) {
                FeedDetailsHelper feedDetailsHelper = FeedDetailsHelper.f14672a;
                feedDetailsHelper.J(3, this.b, getContext());
                FeedDetailsTrackUtil.f14690a.i(this.b, this.f14278c, this.d.getSourcePage(), feedDetailsHelper.l(getContext()), feedDetailsHelper.m(getContext()), getRemainTime(), feedDetailsHelper.d(getContext()));
            }
            FragmentActivity activity = getActivity();
            if (activity != null && activity.isFinishing()) {
                l().submit();
            }
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
    public void onResume() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135025, 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, 135052, 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, 135056, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onViewCreated(this, view, bundle);
        }
    }

    @Nullable
    public final CommunityListItemModel p() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 134995, new Class[0], CommunityListItemModel.class);
        return proxy.isSupported ? (CommunityListItemModel) proxy.result : this.f;
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public final void pushTipChanged(@NotNull r20.f fVar) {
        if (!PatchProxy.proxy(new Object[]{fVar}, this, changeQuickRedirect, false, 135047, new Class[]{r20.f.class}, Void.TYPE).isSupported) {
            PushTipManager.f12835a.c(getContext(), this, fVar);
        }
    }

    @NotNull
    public final String q() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 134993, new Class[0], String.class);
        return proxy.isSupported ? (String) proxy.result : this.e;
    }

    public final TrendProductConfigViewModel r() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135016, new Class[0], TrendProductConfigViewModel.class);
        return (TrendProductConfigViewModel) (proxy.isSupported ? proxy.result : this.H.getValue());
    }

    @NotNull
    public final OneCommentAdapter s() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135007, new Class[0], OneCommentAdapter.class);
        if (proxy.isSupported) {
            return (OneCommentAdapter) proxy.result;
        }
        OneCommentAdapter oneCommentAdapter = this.o;
        if (oneCommentAdapter == null) {
            Intrinsics.throwUninitializedPropertyAccessException("replyAdapter");
        }
        return oneCommentAdapter;
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public final void syncFollowChanged(@NotNull FollowUserSyncEvent followUserSyncEvent) {
        CommunityListItemModel communityListItemModel;
        CommunityFeedModel feed;
        if (!PatchProxy.proxy(new Object[]{followUserSyncEvent}, this, changeQuickRedirect, false, 135046, new Class[]{FollowUserSyncEvent.class}, Void.TYPE).isSupported && (communityListItemModel = this.f) != null && (feed = communityListItemModel.getFeed()) != null) {
            feed.getSafeInteract().setFollow(followUserSyncEvent.isFollow());
            FormPostTopController formPostTopController = this.D;
            if (formPostTopController == null) {
                Intrinsics.throwUninitializedPropertyAccessException("topController");
            }
            formPostTopController.e(feed);
        }
    }

    @NotNull
    public final SingleQuickAdapter t() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135006, new Class[0], SingleQuickAdapter.class);
        return proxy.isSupported ? (SingleQuickAdapter) proxy.result : this.l;
    }

    @NotNull
    public final VirtualLayoutManager u() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 134997, new Class[0], VirtualLayoutManager.class);
        if (proxy.isSupported) {
            return (VirtualLayoutManager) proxy.result;
        }
        VirtualLayoutManager virtualLayoutManager = this.f14279g;
        if (virtualLayoutManager == null) {
            Intrinsics.throwUninitializedPropertyAccessException("virtualLayoutManager");
        }
        return virtualLayoutManager;
    }

    public final void v(@NotNull CommunityFeedModel communityFeedModel) {
        if (!PatchProxy.proxy(new Object[]{communityFeedModel}, this, changeQuickRedirect, false, 135044, new Class[]{CommunityFeedModel.class}, Void.TYPE).isSupported) {
            OneCommentAdapter oneCommentAdapter = this.o;
            if (oneCommentAdapter == null) {
                Intrinsics.throwUninitializedPropertyAccessException("replyAdapter");
            }
            if (oneCommentAdapter.getList().isEmpty()) {
                this.n.setItems(CollectionsKt__CollectionsJVMKt.listOf(communityFeedModel));
            } else if (!this.n.getList().isEmpty()) {
                this.n.clearItems();
            }
            if (this.n.getList().isEmpty()) {
                if (this.e.length() == 0) {
                    this.s.setItems(CollectionsKt__CollectionsJVMKt.listOf(""));
                } else if (!this.s.getList().isEmpty()) {
                    this.s.clearItems();
                }
            } else if (!this.s.getList().isEmpty()) {
                this.s.clearItems();
            }
            this.l.notifyItemChanged(0, "");
        }
    }

    public final void w(String str) {
        if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 135037, new Class[]{String.class}, Void.TYPE).isSupported) {
            ForumDetailsAdapter forumDetailsAdapter = this.i;
            if (forumDetailsAdapter == null) {
                Intrinsics.throwUninitializedPropertyAccessException("forumDetailsAdapter");
            }
            if (forumDetailsAdapter.getItemCount() <= 0 && (true ^ this.N.isEmpty())) {
                ForumDetailsAdapter forumDetailsAdapter2 = this.i;
                if (forumDetailsAdapter2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("forumDetailsAdapter");
                }
                forumDetailsAdapter2.g(new j(this, str));
                ForumDetailsAdapter forumDetailsAdapter3 = this.i;
                if (forumDetailsAdapter3 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("forumDetailsAdapter");
                }
                forumDetailsAdapter3.f(new k(this));
                ForumDetailsAdapter forumDetailsAdapter4 = this.i;
                if (forumDetailsAdapter4 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("forumDetailsAdapter");
                }
                forumDetailsAdapter4.setItems(this.N);
            }
        }
    }

    public final void x(String str, String str2) {
        ArrayList<HtmlSection> arrayList;
        HtmlSection i3;
        if (!PatchProxy.proxy(new Object[]{str, str2}, this, changeQuickRedirect, false, 135030, new Class[]{String.class, String.class}, Void.TYPE).isSupported) {
            ArrayList<HtmlSection> arrayList2 = this.N;
            ForumHtmlParser forumHtmlParser = new ForumHtmlParser();
            String str3 = this.b;
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{str, str3}, forumHtmlParser, ForumHtmlParser.changeQuickRedirect, false, 135168, new Class[]{String.class, String.class}, ArrayList.class);
            if (proxy.isSupported) {
                arrayList = (ArrayList) proxy.result;
            } else {
                forumHtmlParser.f14290a = str3;
                Elements N2 = nm1.c.a(str, "").e0().N();
                ArrayList arrayList3 = new ArrayList();
                Iterator it2 = N2.iterator();
                while (it2.hasNext()) {
                    Element element = (Element) it2.next();
                    if (!(element == null || (i3 = forumHtmlParser.i(element)) == null)) {
                        if (!PatchProxy.proxy(new Object[]{i3}, forumHtmlParser, ForumHtmlParser.changeQuickRedirect, false, 135169, new Class[]{HtmlSection.class}, Void.TYPE).isSupported && (i3 instanceof v80.g)) {
                            v80.g gVar = (v80.g) i3;
                            if (forumHtmlParser.b(gVar)) {
                                forumHtmlParser.j(gVar);
                            }
                        }
                        arrayList3.add(i3);
                    }
                }
                int size = arrayList3.size();
                Iterator it3 = arrayList3.iterator();
                int i12 = 0;
                while (it3.hasNext()) {
                    Object next = it3.next();
                    int i13 = i12 + 1;
                    if (i12 < 0) {
                        CollectionsKt__CollectionsKt.throwIndexOverflow();
                    }
                    HtmlSection htmlSection = (HtmlSection) next;
                    forumHtmlParser.g(i12 == 0 ? null : (HtmlSection) arrayList3.get(i12 - 1), htmlSection, i12 == size - 1 ? null : (HtmlSection) arrayList3.get(i13));
                    i12 = i13;
                }
                forumHtmlParser.a();
                arrayList = forumHtmlParser.e;
            }
            arrayList2.addAll(arrayList);
            int i14 = 0;
            for (T t4 : this.N) {
                int i15 = i14 + 1;
                if (i14 < 0) {
                    CollectionsKt__CollectionsKt.throwIndexOverflow();
                }
                T t12 = t4;
                HtmlSection htmlSection2 = i14 < this.N.size() - 2 ? this.N.get(i15) : null;
                if (t12 instanceof v80.e) {
                    this.f14282u.add(t12);
                    T t13 = t12;
                    if (!this.t.contains(t13.c())) {
                        this.t.add(t13.c());
                    }
                } else if ((t12 instanceof v80.h) && (htmlSection2 instanceof v80.j)) {
                    T t14 = t12;
                    int c5 = ForumDetailsAdapter.t.c();
                    if (!PatchProxy.proxy(new Object[]{new Integer(c5)}, t14, v80.h.changeQuickRedirect, false, 135307, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) {
                        t14.d = c5;
                    }
                } else if ((t12 instanceof v80.j) && (htmlSection2 instanceof v80.h)) {
                    T t15 = t12;
                    int c12 = ForumDetailsAdapter.t.c();
                    if (!PatchProxy.proxy(new Object[]{new Integer(c12)}, t15, v80.j.changeQuickRedirect, false, 135368, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) {
                        t15.b = c12;
                    }
                }
                i14 = i15;
            }
            this.N.add(0, new v80.k(str2, null, 2));
        }
    }

    public final void y() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 135039, new Class[0], Void.TYPE).isSupported) {
            PreLoadUtil.f7854c.a().c(getContext(), LifecycleOwnerKt.getLifecycleScope(this), new ForumPostDetailsFragment$preloadImage$1(new ArrayList(this.f14282u)));
        }
    }

    public final void z(@NotNull String str) {
        if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 134994, new Class[]{String.class}, Void.TYPE).isSupported) {
            this.e = str;
        }
    }
}