package com.ss.android.ugc.aweme.comment.ui;

import X.0AA;
import X.0AP;
import X.0Bs;
import X.0Bv;
import X.0Bx;
import X.0By;
import X.0GZ;
import X.1hK;
import X.2GD;
import X.2I7;
import X.2Pr;
import X.2Sa;
import X.2UX;
import X.2YM;
import X.2ha;
import X.2kf;
import X.2ma;
import X.2nK;
import X.3cv;
import X.3jJ;
import X.4Ev;
import X.4ZZ;
import X.878;
import X.A5G;
import X.AS5;
import X.AnonymousClass9ly;
import X.AnonymousClass9mF;
import X.AnonymousClass9mN;
import X.AnonymousClass9nR;
import X.AnonymousClass9o8;
import X.AnonymousClass9pE;
import X.AnonymousClass9rA;
import X.AnonymousClass9rT;
import X.AnonymousClass9wY;
import X.AnonymousClass9wZ;
import X.AnonymousClass9xD;
import X.C00019mb;
import X.C00279nb;
import X.C00509ny;
import X.C01259qv;
import X.C01899th;
import X.C02609wa;
import X.C02619wb;
import X.C02659wf;
import X.C02669wg;
import X.C02689wi;
import X.C0647AAx;
import X.C1132ATo;
import X.C6523Cc3;
import X.Cl7;
import X.Cpk;
import X.CqM;
import X.Cwu;
import X.DwO;
import X.ESC;
import X.Etp;
import X.Lrq;
import X.M12;
import X.Qeg;
import X.Qz3;
import X.Qz9;
import X.QzJ;
import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
import android.os.Bundle;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import androidx.fragment.app.Fragment;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.uikit.base.AbsFragment;
import com.google.gson.Gson;
import com.ss.android.ugc.aweme.arch.widgets.base.DataCenter;
import com.ss.android.ugc.aweme.arch.widgets.base.Widget;
import com.ss.android.ugc.aweme.arch.widgets.base.WidgetManager;
import com.ss.android.ugc.aweme.awemeservice.AwemeService;
import com.ss.android.ugc.aweme.comment.CommentServiceImpl;
import com.ss.android.ugc.aweme.comment.model.Comment;
import com.ss.android.ugc.aweme.comment.widget.CommentNestedLayout;
import com.ss.android.ugc.aweme.commercialize.depend.AdCommentDependImpl;
import com.ss.android.ugc.aweme.ecommerce.eventcenter.EventCenter;
import com.ss.android.ugc.aweme.feed.model.Aweme;
import com.ss.android.ugc.aweme.feed.model.AwemeStatistics;
import com.ss.android.ugc.aweme.homepage.msadapt.MSAdaptionService;
import java.io.Serializable;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import kotlin.h.b.n;

public class CommentListPageFragment extends AbsFragment implements C02609wa, AnonymousClass9mN {
    public static final int LIZ = 2ha.LIZ(16.0d);
    public static final int LIZIZ = 2ha.LIZ(99.0d);
    public static long LJIJJLI = 0;
    public 0GZ LIZJ;
    public List<Fragment> LIZLLL;
    public List<Integer> LJ;
    public AS5 LJIIIZ;
    public DataCenter LJIIJ;
    public C02689wi LJIIJJI;
    public WidgetManager LJIIL;
    public AnonymousClass9ly LJIILIIL = new AnonymousClass9ly("");
    public Aweme LJIILJJIL;
    public boolean LJIILL = false;
    public boolean LJIILLIIL = false;
    public boolean LJIIZILJ = false;
    public int LJIJ = -1;
    public long LJIJI;
    public String LJIJJ = "";
    public View LJIL;
    public CommentNestedLayout LJJ;
    public ImageView LJJI;
    public View LJJIFFI;
    public Qeg LJJII;
    public 4ZZ LJJIII;
    public Qeg LJJIIJ;
    public 4ZZ LJJIIJZLJL;
    public ViewGroup LJJIIZ;
    public C1132ATo LJJIIZI;
    public Qz3 LJJIJ;
    public View LJJIJIIJI;
    public Widget LJJIJIIJIL;
    public ViewGroup LJJIJIL;
    public Lrq LJJIJL;
    public 2YM<Etp> LJJIJLIJ;
    public boolean LJJIL = false;
    public long LJJIZ;
    public long LJJJ;
    public boolean LJJJI = false;

    public final void LIZ(C00279nb r1) {
    }

    public final View LJ() {
        return this.LJJII;
    }

    public final void LIZ(String str, int i) {
        if (LJIIL() || LJIIIIZZ()) {
            2UX r3 = new 2UX();
            r3.LIZ("enter_method", LIZIZ(str));
            r3.LIZ("enter_from", this.LJIILIIL.getEventType());
            r3.LIZ("tab_name", LIZIZ(i));
            r3.LIZ("group_id", this.LJIILIIL.getAid());
            Aweme aweme = this.LJIILJJIL;
            long j = 0;
            r3.LIZ("video_create_time", aweme != null ? aweme.getCreateTime() : 0);
            if (this.LJIILJJIL != null) {
                j = (System.currentTimeMillis() / 1000) - this.LJIILJJIL.getCreateTime();
            }
            r3.LIZ("video_elapsed_time", j);
            r3.LIZ("story_type", Cl7.LJ(this.LJIILJJIL) ? "story" : "post");
            r3.LIZ("story_collection_id", Cl7.LIZIZ(this.LJIILJJIL));
            r3.LIZ("vv_cnt", LJIIJJI());
            2nK.LIZ("enter_author_reaction_panel", r3.LIZ);
        }
    }

    public final void LIZ(String str, String str2, int i, long j) {
        if (LJIIL() || LJIIIIZZ()) {
            2UX r3 = new 2UX();
            r3.LIZ("enter_method", LIZIZ(str));
            r3.LIZ("enter_from", this.LJIILIIL.getEventType());
            r3.LIZ("tab_name", LIZIZ(i));
            r3.LIZ("group_id", this.LJIILIIL.getAid());
            r3.LIZ("duration", j);
            r3.LIZ("exit_method", str2);
            r3.LIZ("story_type", Cl7.LJ(this.LJIILJJIL) ? "story" : "post");
            r3.LIZ("story_collection_id", Cl7.LIZIZ(this.LJIILJJIL));
            r3.LIZ("vv_cnt", LJIIJJI());
            2nK.LIZ("close_author_reaction_panel", r3.LIZ);
        }
    }

    /* JADX WARNING: Code restructure failed: missing block: B:4:0x000d, code lost:
        r3 = r0.LIZIZ(r1);
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LIZ(X.AnonymousClass9wY r7) {
        /*
            r6 = this;
            java.util.List<androidx.fragment.app.Fragment> r0 = r6.LIZLLL
            int r1 = r0.indexOf(r7)
            if (r1 < 0) goto L_0x000c
            X.Qz3 r0 = r6.LJJIJ
            if (r0 != 0) goto L_0x000d
        L_0x000c:
            return
        L_0x000d:
            X.Qz9 r3 = r0.LIZIZ(r1)
            if (r3 == 0) goto L_0x000c
            android.content.Context r5 = r6.getContext()
            boolean r0 = r6.LJIL()
            if (r0 == 0) goto L_0x005d
            boolean r0 = r7.LJIIJ()
            if (r0 == 0) goto L_0x005d
            if (r5 == 0) goto L_0x005d
            android.view.View r0 = r3.LJFF
            r4 = 0
            if (r0 != 0) goto L_0x003a
            android.view.LayoutInflater r2 = android.view.LayoutInflater.from(r5)
            r1 = 2131558825(0x7f0d01a9, float:1.8742977E38)
            X.Qz0 r0 = r3.LJIIIIZZ
            android.view.View r0 = X.0HH.LIZ(r2, r1, r0, r4)
            r3.LIZ(r0)
        L_0x003a:
            X.Qz0 r0 = r3.LJIIIIZZ
            r0.setUseInnerMarginBottomWhenUseIconView(r4)
            X.Qz0 r1 = r3.LJIIIIZZ
            com.ss.android.ugc.aweme.comment.ui.CommentListPageFragment$3 r0 = new com.ss.android.ugc.aweme.comment.ui.CommentListPageFragment$3
            r0.<init>(r3, r5)
            r1.setTabViewSelectedListener(r0)
            java.lang.String r0 = r7.LJIIIIZZ()
            r3.LIZ(r0)
            X.QNA r1 = new X.QNA
            int r0 = r7.LJIIIZ()
            r1.<init>(r5, r0)
            r3.LIZ(r1)
            return
        L_0x005d:
            X.Qz0 r1 = r3.LJIIIIZZ
            r0 = 1
            r1.setUseInnerMarginBottomWhenUseIconView(r0)
            java.lang.String r0 = r7.LJII()
            r3.LIZ(r0)
            goto L_0x000c
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.comment.ui.CommentListPageFragment.LIZ(X.9wY):void");
    }

    public final void LIZ(int i, boolean z) {
        this.LJIILLIIL = false;
        this.LJJJI = true;
        this.LIZJ.setCurrentItem(i, z);
        this.LIZLLL.get(i).LIZ(true);
        this.LJIJ = i;
        this.LJJJI = false;
        this.LJJIIZI.LIZIZ = true;
    }

    public final void LIZ(2YM<Etp> r4) {
        this.LJJIJLIJ = r4;
        List<Fragment> list = this.LIZLLL;
        if (list != null && !list.isEmpty()) {
            Iterator<Fragment> it = this.LIZLLL.iterator();
            while (it.hasNext()) {
                C02609wa r1 = (Fragment) it.next();
                if (r1 instanceof C02609wa) {
                    r1.LIZ(r4);
                }
            }
        }
    }

    public final void LIZ(Comment comment, boolean z) {
        List<Fragment> list = this.LIZLLL;
        if (list != null && !list.isEmpty()) {
            Iterator<Fragment> it = this.LIZLLL.iterator();
            while (it.hasNext()) {
                C02609wa r1 = (Fragment) it.next();
                if (r1 instanceof C02609wa) {
                    r1.LIZ(comment, z);
                }
            }
        }
    }

    public final void LIZ(Comment comment) {
        List<Fragment> list = this.LIZLLL;
        if (list != null && !list.isEmpty()) {
            Iterator<Fragment> it = this.LIZLLL.iterator();
            while (it.hasNext()) {
                C02609wa r1 = (Fragment) it.next();
                if (r1 instanceof C02609wa) {
                    r1.LIZ(comment);
                }
            }
        }
    }

    public final void LIZ(Exception exc, int i, Comment comment) {
        List<Fragment> list = this.LIZLLL;
        if (list != null && !list.isEmpty()) {
            Iterator<Fragment> it = this.LIZLLL.iterator();
            while (it.hasNext()) {
                C02609wa r1 = (Fragment) it.next();
                if (r1 instanceof C02609wa) {
                    r1.LIZ(exc, i, comment);
                }
            }
        }
    }

    private long LJIIJJI() {
        AwemeStatistics statistics = this.LJIILJJIL.getStatistics();
        if (statistics == null) {
            return 0;
        }
        return statistics.getPlayCount();
    }

    public final void LIZLLL() {
        CommentNestedLayout commentNestedLayout = this.LJJ;
        if (commentNestedLayout != null) {
            commentNestedLayout.LIZ(true, true);
        }
    }

    public void onDestroyView() {
        CommentListPageFragment.super.onDestroyView();
        WidgetManager widgetManager = this.LJIIL;
        if (widgetManager != null) {
            widgetManager.LIZIZ(this.LJJIJIIJIL);
        }
    }

    public void onStop() {
        CommentListPageFragment.super.onStop();
        this.LJJIZ = System.currentTimeMillis();
    }

    static {
        Covode.recordClassIndex(57337);
    }

    private void LJII() {
        this.LJIIJ.LIZ("comment_aweme_and_params", new Cwu(this.LJIILJJIL, this.LJIILIIL));
    }

    private boolean LJIIL() {
        Aweme aweme = this.LJIILJJIL;
        if (aweme == null || !ESC.LIZ(aweme.getAuthorUid()) || !Cl7.LJ(this.LJIILJJIL)) {
            return false;
        }
        return true;
    }

    private void LJIILLIIL() {
        if (LJIIIZ()) {
            if (LJIJ()) {
                LJIIZILJ();
            }
        } else if (LIZJ(2)) {
            LJIIZILJ();
        }
    }

    private boolean LJIL() {
        if (!CommentServiceImpl.LJI().LJ() || !A5G.LIZLLL()) {
            return false;
        }
        return true;
    }

    public final long LJI() {
        long j;
        long currentTimeMillis = System.currentTimeMillis() - this.LJIJI;
        long j2 = this.LJJJ;
        if (currentTimeMillis > j2) {
            j = currentTimeMillis - j2;
        } else {
            j = 0;
        }
        this.LJIJI = 0;
        this.LJJIZ = 0;
        this.LJJJ = 0;
        return j;
    }

    private boolean LJIIIIZZ() {
        Aweme aweme;
        if (!2Sa.LIZ() || (aweme = this.LJIILJJIL) == null) {
            return false;
        }
        if ((!Cl7.LJ(aweme) || C01259qv.LIZ()) && ESC.LIZ(this.LJIILJJIL.getAuthorUid())) {
            return true;
        }
        return false;
    }

    private boolean LJIIIZ() {
        if (!Cpk.LIZ.LIZJ() || !Cl7.LJ(this.LJIILJJIL) || C01259qv.LIZ() || "story_archive".equals(this.LJIILIIL.getEnterFrom()) || !ESC.LIZ(this.LJIILJJIL.getAuthorUid())) {
            return false;
        }
        return true;
    }

    private Fragment LJIILIIL() {
        if (878.LIZ(this.LJ)) {
            return null;
        }
        for (int i = 0; i < this.LJ.size(); i++) {
            if (this.LJ.get(i).intValue() == 0) {
                return this.LIZLLL.get(i);
            }
        }
        return null;
    }

    private void LJIILJJIL() {
        if (LJIIIIZZ()) {
            if (LJIJI()) {
                LJIIZILJ();
                LIZJ(true);
            }
        } else if (LIZJ(1)) {
            LJIIZILJ();
            LIZJ(false);
        }
    }

    private void LJIILL() {
        if (LIZ(this.LJIILJJIL)) {
            if (LJIJJLI()) {
                LJIIZILJ();
                LIZJ(true);
            }
        } else if (LIZJ(4)) {
            LJIIZILJ();
            LIZJ(false);
        }
    }

    private boolean LJIJI() {
        if (this.LJ.contains(1)) {
            return false;
        }
        this.LIZLLL.add(LikeListFragment.LIZ(requireActivity(), this.LJIILIIL, this.LJIILJJIL, this));
        this.LJ.add(1);
        AnonymousClass9pE.LIZ("mFragmentLists.add  LIKE_LIST");
        C02689wi r0 = this.LJIIJJI;
        if (r0 != null) {
            r0.LIZJ();
        }
        return true;
    }

    private boolean LJIJJLI() {
        List<Integer> list = this.LJ;
        if (list == null || list.contains(4)) {
            M12.LIZ("contains VIDEO_VIEW_LIST 1");
            return false;
        }
        this.LIZLLL.add(VideoViewerListFragment.LIZ(requireActivity(), this.LJIILIIL, this.LJIILJJIL, this));
        AnonymousClass9pE.LIZ("mFragmentLists.add  VIDEO_VIEW_LIST");
        this.LJ.add(4);
        C02689wi r0 = this.LJIIJJI;
        if (r0 == null) {
            return true;
        }
        r0.LIZJ();
        return true;
    }

    public final boolean LIZJ() {
        CommentNestedLayout commentNestedLayout;
        if (!isVisible() || (commentNestedLayout = this.LJJ) == null || !commentNestedLayout.LIZ()) {
            return false;
        }
        return true;
    }

    public final void LJFF() {
        Iterator<Fragment> it = this.LIZLLL.iterator();
        while (it.hasNext()) {
            AnonymousClass9wY r1 = (Fragment) it.next();
            if (r1 instanceof AnonymousClass9wY) {
                r1.LIZ(this.LIZLLL.size());
            }
        }
    }

    public void onResume() {
        CommentListPageFragment.super.onResume();
        if (this.LJJIL) {
            this.LJJIL = false;
        } else if (LIZJ() && this.LJJIZ != 0) {
            this.LJJJ += System.currentTimeMillis() - this.LJJIZ;
            this.LJJIZ = 0;
        }
    }

    private void LJIIJ() {
        View view;
        boolean z;
        boolean z2;
        if (C00509ny.LIZ() && (view = getView()) != null) {
            C0647AAx aAx = C0647AAx.LIZ;
            FrameLayout frameLayout = (FrameLayout) view.findViewById(2131365542);
            boolean z3 = false;
            if (CommentListFragment.LIZ(this.LJIILIIL, this.LJIILJJIL) || this.LJIILIIL.isForceHidePoi()) {
                z = true;
            } else {
                z = false;
            }
            boolean LIZ2 = aAx.LIZ(frameLayout, z, this.LJIILJJIL, this.LJIILIIL, this.LJJIII);
            boolean LIZIZ2 = C0647AAx.LIZ.LIZIZ(getView(), this.LJIILJJIL, this.LJIILIIL, LIZ2);
            C0647AAx aAx2 = C0647AAx.LIZ;
            View view2 = getView();
            Aweme aweme = this.LJIILJJIL;
            AnonymousClass9ly r1 = this.LJIILIIL;
            if (LIZ2 || LIZIZ2) {
                z2 = true;
            } else {
                z2 = false;
            }
            boolean LIZ3 = aAx2.LIZ(view2, aweme, r1, z2);
            CommentListFragment LJIILIIL2 = LJIILIIL();
            if (LJIILIIL2 instanceof CommentListFragment) {
                CommentListFragment commentListFragment = LJIILIIL2;
                if (LIZ2 || LIZIZ2 || LIZ3) {
                    z3 = true;
                }
                commentListFragment.LJJJJIZL = z3;
            }
        }
    }

    private boolean LJIJ() {
        C02659wf LIZIZ2;
        if (this.LJ.contains(2) || (LIZIZ2 = DwO.LIZ.LIZIZ(this.LJIILJJIL.getAid())) == null) {
            return false;
        }
        LIZIZ2.LIZIZ(this.LJIILJJIL);
        ((AnonymousClass9wY) LIZIZ2.LIZ()).LIZ(this.LJIILIIL);
        ((AnonymousClass9wY) LIZIZ2.LIZ()).LIZ((AnonymousClass9mN) this);
        this.LIZLLL.add(0, LIZIZ2.LIZ());
        this.LJ.add(0, 2);
        AnonymousClass9pE.LIZ("mFragmentLists.add  STORY_LIKE_LIST");
        C02689wi r0 = this.LJIIJJI;
        if (r0 == null) {
            return true;
        }
        r0.LIZJ();
        return true;
    }

    private void LJIIZILJ() {
        Iterator<Fragment> it = this.LIZLLL.iterator();
        while (true) {
            boolean z = true;
            if (!it.hasNext()) {
                break;
            }
            AnonymousClass9wY r1 = (Fragment) it.next();
            if (r1 instanceof AnonymousClass9wY) {
                AnonymousClass9wY r12 = r1;
                if (this.LIZLLL.size() != 1) {
                    z = false;
                }
                r12.LIZJ(z);
            }
        }
        if (this.LIZLLL.size() > 1) {
            this.LJJIJ.setVisibility(0);
            this.LJJII.setVisibility(8);
            C01899th.LIZ(this.LJJIFFI, 4Ev.LIZIZ(48));
            this.LJJIJ.setSelectedTabIndicatorHeight(2ha.LIZ(2.0d));
            this.LJJIJIIJI.setVisibility(0);
        } else {
            C01899th.LIZ(this.LJJIFFI, 4Ev.LIZIZ(40));
            this.LJJIJ.setVisibility(8);
            this.LJJII.setVisibility(0);
            this.LJJIJIIJI.setVisibility(8);
        }
        LJFF();
        LIZ(0);
    }

    public final boolean LIZIZ() {
        CommentNestedLayout commentNestedLayout = this.LJJ;
        if (commentNestedLayout == null || commentNestedLayout.LJ == null || !commentNestedLayout.LJII) {
            return false;
        }
        return true;
    }

    public final void LIZ() {
        if (this.LJJ != null) {
            AS5 onShowHeightChangeListener = this.LJIILIIL.getOnShowHeightChangeListener();
            this.LJIIIZ = onShowHeightChangeListener;
            this.LJJ.setOnShowHeightChangeListener(onShowHeightChangeListener);
            CommentNestedLayout.LIZ(this.LJJ);
        }
    }

    public final void LIZ(String str) {
        CommentNestedLayout commentNestedLayout = this.LJJ;
        if (commentNestedLayout != null) {
            commentNestedLayout.LIZ(str);
        }
    }

    public final void LIZ(boolean z) {
        CommentNestedLayout commentNestedLayout = this.LJJ;
        if (commentNestedLayout != null) {
            commentNestedLayout.LIZ(z);
        }
    }

    public final void LIZIZ(boolean z) {
        int i;
        ImageView imageView = this.LJJI;
        if (imageView != null) {
            if (z) {
                i = 8;
            } else {
                i = 0;
            }
            imageView.setVisibility(i);
        }
    }

    public static 1hK LIZIZ(Context context) {
        while (context != null) {
            1hK LIZIZ2 = 3jJ.LIZIZ(context);
            if (LIZIZ2 != null) {
                return LIZIZ2;
            }
            if (!(context instanceof ContextWrapper)) {
                return null;
            }
            context = ((ContextWrapper) context).getBaseContext();
        }
        return null;
    }

    private void LIZJ(boolean z) {
        int i;
        ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) this.LJJIJ.getLayoutParams();
        int marginEnd = marginLayoutParams.getMarginEnd();
        if (z) {
            i = LIZIZ;
        } else {
            i = LIZ;
        }
        if (marginEnd != i) {
            marginLayoutParams.setMarginEnd(i);
            this.LJJIJ.setLayoutParams(marginLayoutParams);
        }
    }

    public void onCreate(Bundle bundle) {
        CommentListPageFragment.super.onCreate(bundle);
        Bundle arguments = getArguments();
        if (arguments != null) {
            this.LJIILIIL = (AnonymousClass9ly) arguments.getSerializable("id");
        }
    }

    public void onSaveInstanceState(Bundle bundle) {
        3cv.LIZ("CommentListPageFragment onSaveInstanceState");
        bundle.putBoolean("should_remove", true);
        bundle.putSerializable("page_param", this.LJIILIIL);
    }

    public static CommentListPageFragment LIZ(Context context) {
        1hK LIZIZ2 = LIZIZ(context);
        if (LIZIZ2 == null) {
            return null;
        }
        CommentListPageFragment LIZ2 = LIZIZ2.getSupportFragmentManager().LIZ("comment_page");
        if (LIZ2 instanceof CommentListPageFragment) {
            return LIZ2;
        }
        return null;
    }

    private String LIZIZ(int i) {
        List<Integer> list;
        List<Integer> list2 = this.LJ;
        if ((list2 != null && list2.size() == 1) || ((list = this.LJ) != null && list.size() > 1 && i < 0)) {
            i = 0;
        } else if (878.LIZ(this.LJ) || i < 0 || i >= this.LJ.size()) {
            return "";
        }
        return AnonymousClass9xD.LIZ(this.LJ.get(i).intValue());
    }

    private void LIZ(AnonymousClass9ly r5) {
        if (r5 != null && r5.getLocatePageType() >= 0) {
            if (!878.LIZ(this.LJ)) {
                int locatePageType = r5.getLocatePageType();
                final int i = 0;
                while (i < this.LJ.size()) {
                    if (this.LJ.get(i).intValue() != locatePageType) {
                        i++;
                    } else if (this.LIZJ != null && this.LJIIJJI.LIZIZ() > i) {
                        if (r5.isSmoothScrollLocate()) {
                            2ma.LIZ.LIZ(new Runnable() {
                                static {
                                    Covode.recordClassIndex(57341);
                                }

                                public final void run() {
                                    CommentListPageFragment.this.LIZ(i, true);
                                }
                            }, 400);
                            return;
                        } else {
                            LIZ(i, false);
                            return;
                        }
                    } else {
                        return;
                    }
                }
            } else if (this.LIZJ != null && this.LJIIJJI.LIZIZ() > 0) {
                this.LIZJ.setCurrentItem(0, false);
                this.LIZLLL.get(0).LIZ(true);
            }
        }
    }

    private String LIZIZ(String str) {
        if (!TextUtils.isEmpty(str) || !TextUtils.equals(this.LJIILIIL.getEventType(), "notification_page")) {
            return str;
        }
        return "click_notification";
    }

    private boolean LIZJ(int i) {
        if (!878.LIZ(this.LJ) && this.LJIIJJI != null) {
            for (int i2 = 0; i2 < this.LJ.size(); i2++) {
                if (this.LJ.get(i2).intValue() == i) {
                    this.LJ.remove(i2);
                    this.LIZLLL.remove(i2);
                    AnonymousClass9pE.LIZ("removeListByType pageType:".concat(String.valueOf(i)));
                    this.LJIIJJI.LIZJ();
                    return true;
                }
            }
        }
        return false;
    }

    public void onActivityCreated(Bundle bundle) {
        CommentListPageFragment.super.onActivityCreated(bundle);
        if (bundle != null) {
            boolean z = bundle.getBoolean("should_remove", false);
            this.LJJIL = z;
            if (z) {
                LIZ(false);
                0AP LIZ2 = getFragmentManager().LIZ();
                LIZ2.LIZ(this);
                LIZ2.LIZJ();
                return;
            }
            Serializable serializable = bundle.getSerializable("page_param");
            if (serializable instanceof AnonymousClass9ly) {
                this.LJIILIIL = (AnonymousClass9ly) serializable;
                this.LJIILJJIL = AwemeService.LIZIZ().LIZIZ(this.LJIILIIL.getAid());
            }
        }
    }

    private void LIZIZ(Aweme aweme) {
        if (this.LJIILJJIL != aweme) {
            this.LJIILJJIL = aweme;
            if (!878.LIZ(this.LIZLLL)) {
                Iterator<Fragment> it = this.LIZLLL.iterator();
                while (it.hasNext()) {
                    AnonymousClass9wY r1 = (Fragment) it.next();
                    if (r1 instanceof AnonymousClass9wY) {
                        r1.LIZ(aweme);
                    }
                }
                LJIIJ();
            }
        }
    }

    private void LIZLLL(boolean z) {
        if (z) {
            if (this.LJIJI == 0) {
                this.LJIJI = System.currentTimeMillis();
            }
            this.LJIIZILJ = true;
            if (!this.LJIILLIIL) {
                int locatePageType = this.LJIILIIL.getLocatePageType();
                int indexOf = this.LJ.indexOf(Integer.valueOf(locatePageType));
                M12.LIZ("comment_page", "onVisibleToUser locate:" + locatePageType + "  position:" + indexOf + "  current position:" + this.LJIJ);
                LIZ(this.LJIILIIL.getEnterMethod(), this.LJIJ);
                this.LJIILLIIL = true;
            } else {
                M12.LIZ("comment_page", "onVisibleToUser locate: has mob");
            }
            if (C00509ny.LIZ()) {
                EventCenter.LIZ().LIZ("ec_anchor_open_comment", new Gson().LIZIZ(new C00019mb(this.LJIILIIL.getEventType())));
            }
            if (AnonymousClass9o8.LIZLLL()) {
                CommentNestedLayout commentNestedLayout = this.LJJ;
                if (commentNestedLayout.LIZJ > 0.0f) {
                    View mCommentBgContainer = commentNestedLayout.getMCommentBgContainer();
                    n.LIZIZ(mCommentBgContainer, "");
                    C01899th.LIZ(mCommentBgContainer, (int) commentNestedLayout.LIZJ);
                }
            }
        } else if (this.LJIJI != 0) {
            this.LJIIZILJ = false;
            LIZ(this.LJIILIIL.getEnterMethod(), "close", this.LJIJ, LJI());
        }
    }

    private boolean LIZ(Aweme aweme) {
        if (aweme == null) {
            return false;
        }
        if ((!Cl7.LJ(aweme) || C01259qv.LIZ()) && ESC.LIZ(aweme.getAuthorUid()) && A5G.LIZ(aweme, this.LJIILIIL.getEventType())) {
            return true;
        }
        return false;
    }

    private void LIZIZ(AnonymousClass9ly r7) {
        boolean z;
        boolean z2;
        if (TextUtils.equals(r7.getAid(), this.LJIILIIL.getAid()) && r7.isCommentClose() == this.LJIILIIL.isCommentClose() && r7.isCommentLimited() == this.LJIILIIL.isCommentLimited() && r7.isEnableComment() == this.LJIILIIL.isEnableComment()) {
            z = false;
        } else {
            z = true;
        }
        if (r7.getLocatePageType() != 4 || !LIZ(this.LJIILJJIL) || this.LJ.contains(4)) {
            z2 = false;
        } else {
            z2 = true;
        }
        AnonymousClass9pE.LIZ("CommentListPageFragment: resetPageParam() => differentAweme = " + z + " forceResetPage =  " + z2);
        if (z || z2) {
            this.LJIILIIL = r7;
            Context context = getContext();
            if (context != null && z) {
                AnonymousClass9ly r2 = this.LJIILIIL;
                M12.LIZ(r2, this.LJIILJJIL, context);
                if ((AnonymousClass9nR.LIZ.LIZ() & 2) == 2) {
                    AnonymousClass9mF.LIZLLL.LIZ(r2, context);
                }
            }
            if (getContext() != null) {
                this.LJJIJIL.setVisibility(8);
            }
            LJIILJJIL();
            LJIILL();
            LJIILLIIL();
            if (this.LJIILIIL.getLocatePageType() < 0) {
                this.LJIILIIL.setLocatePageType(0);
            }
            LIZ(this.LJIILIIL);
            if (!878.LIZ(this.LIZLLL)) {
                Iterator<Fragment> it = this.LIZLLL.iterator();
                while (it.hasNext()) {
                    AnonymousClass9wY r1 = (Fragment) it.next();
                    if (r1 instanceof AnonymousClass9wY) {
                        r1.LIZ(r7);
                    }
                }
            }
            LJII();
            return;
        }
        AnonymousClass9pE.LIZ("CommentListPageFragment: resetPageParam() => differentAweme = false, new aid = " + r7.getAid());
        if (!TextUtils.equals(r7.getEnterMethod(), this.LJIILIIL.getEnterMethod())) {
            this.LJIILIIL.setEnterMethod(r7.getEnterMethod());
        }
        LIZ(r7);
        for (int i = 0; i < this.LJ.size(); i++) {
            if (this.LIZLLL.get(i) instanceof C02609wa) {
                this.LIZLLL.get(i).LIZ(r7);
            }
        }
    }

    public final /* synthetic */ 2Pr LIZ(C02619wb r6) {
        if (r6.LIZ == AnonymousClass9wZ.SHOW_START) {
            if (getActivity() != null) {
                C6523Cc3.LIZ((Activity) getActivity());
                CqM.LIZ(new 2I7(1, getActivity().hashCode()));
            }
            List<Fragment> list = this.LIZLLL;
            if (list != null && !list.isEmpty()) {
                Iterator<Fragment> it = this.LIZLLL.iterator();
                while (it.hasNext()) {
                    AnonymousClass9wY r1 = (Fragment) it.next();
                    if (r1 instanceof AnonymousClass9wY) {
                        getActivity();
                        r1.LJIIJJI();
                    }
                }
                LIZLLL(true);
            }
        } else if (r6.LIZ == AnonymousClass9wZ.HIDE_START) {
            String str = r6.LIZIZ;
            if (getActivity() != null) {
                C6523Cc3.LIZIZ((Activity) getActivity());
                CqM.LIZ(new 2I7(0, getActivity().hashCode()));
            }
            List<Fragment> list2 = this.LIZLLL;
            if (list2 != null && !list2.isEmpty()) {
                Iterator<Fragment> it2 = this.LIZLLL.iterator();
                while (it2.hasNext()) {
                    AnonymousClass9wY r12 = (Fragment) it2.next();
                    if (r12 instanceof AnonymousClass9wY) {
                        getActivity();
                        r12.LIZ(str);
                    }
                }
                LIZLLL(false);
            }
        }
        AnonymousClass9wZ r4 = r6.LIZ;
        if (!this.LJIILIIL.isShowBackgroundOverlay()) {
            return null;
        }
        if (r4 == AnonymousClass9wZ.SHOW_END) {
            this.LJIL.setAlpha(0.0f);
            this.LJIL.animate().alpha(1.0f).setDuration(150).start();
            return null;
        } else if (r4 != AnonymousClass9wZ.HIDE_END) {
            return null;
        } else {
            this.LJIL.animate().alpha(0.0f).setDuration(150).start();
            return null;
        }
    }

    public final void LIZ(int i) {
        boolean z;
        M12.LIZ("comment_page", "tryOpenSwipeToRight2Close ".concat(String.valueOf(i)));
        if (i < this.LJ.size()) {
            int indexOf = this.LJ.indexOf(Integer.valueOf(i));
            CommentNestedLayout commentNestedLayout = this.LJJ;
            if (indexOf == 0 && i == 0) {
                z = true;
            } else {
                z = false;
            }
            commentNestedLayout.setEnableSwipeRightToClose(z);
        }
    }

    public void onViewCreated(View view, Bundle bundle) {
        boolean z;
        CommentListPageFragment.super.onViewCreated(view, bundle);
        0Bx LIZ2 = 0By.LIZ(this, (0Bv) null);
        if (2GD.LIZ) {
            0Bs.LIZ(LIZ2, this);
        }
        this.LJIIJ = DataCenter.LIZ(LIZ2, this);
        WidgetManager LIZ3 = WidgetManager.LIZ(this, view);
        this.LJIIL = LIZ3;
        LIZ3.LIZ(this.LJIIJ);
        Widget LIZIZ2 = AdCommentDependImpl.LIZIZ().LIZIZ(new C02669wg(this));
        this.LJJIJIIJIL = LIZIZ2;
        this.LJIIL.LIZ(2131363679, LIZIZ2);
        LJII();
        this.LIZLLL = new LinkedList();
        this.LJ = new LinkedList();
        LJIILLIIL();
        if (this.LIZLLL.size() != 0 || LJIIIIZZ() || LIZ(this.LJIILJJIL)) {
            z = false;
        } else {
            z = true;
        }
        this.LJIILIIL.setShowTitle(z);
        AnonymousClass9ly r4 = this.LJIILIIL;
        Aweme aweme = this.LJIILJJIL;
        Bundle bundle2 = new Bundle();
        bundle2.putSerializable("id", r4);
        CommentListFragment commentListFragment = new CommentListFragment();
        commentListFragment.setArguments(bundle2);
        commentListFragment.LIZIZ(aweme);
        commentListFragment.LIZIZ(r4);
        commentListFragment.LJIIZILJ = this.LJJIII;
        commentListFragment.LJIJ = this.LJJIIJ;
        commentListFragment.LJIJI = this.LJJIIJZLJL;
        commentListFragment.LJJJJLI = false;
        commentListFragment.LIZ((AnonymousClass9mN) this);
        commentListFragment.LIZ(this.LJJIJLIJ);
        this.LIZLLL.add(commentListFragment);
        AnonymousClass9pE.LIZ("mFragmentLists.add  COMMENT_LIST");
        this.LJ.add(0);
        LJIILJJIL();
        LJIILL();
        LJIIZILJ();
        AnonymousClass9pE.LIZ("int CommentPageFragmentAdapter fragmentSize " + this.LIZLLL.size());
        C02689wi r3 = new C02689wi(getChildFragmentManager(), this.LIZLLL, this.LJ);
        this.LJIIJJI = r3;
        this.LIZJ.setAdapter(r3);
        this.LJJIJ.setupWithViewPager(this.LIZJ);
        this.LJJIJ.LIZ(new QzJ() {
            static {
                Covode.recordClassIndex(57339);
            }

            public final void LIZJ(Qz9 qz9) {
            }

            public final void LIZ(Qz9 qz9) {
                String enterMethod;
                CommentListPageFragment.this.LJIILIIL.getEnterFrom();
                CommentListPageFragment.this.LJIILIIL.getEnterMethod();
                CommentListPageFragment.this.LJIJI = System.currentTimeMillis();
                CommentListPageFragment commentListPageFragment = CommentListPageFragment.this;
                if (!commentListPageFragment.LJIIZILJ) {
                    enterMethod = CommentListPageFragment.this.LJIILIIL.getEnterMethod();
                } else if (CommentListPageFragment.this.LJIILL) {
                    enterMethod = "click_label";
                } else {
                    enterMethod = "slide";
                }
                commentListPageFragment.LIZ(enterMethod, qz9.LJ);
                CommentListPageFragment.this.LJIJ = qz9.LJ;
                if (CommentListPageFragment.this.LIZLLL.get(qz9.LJ) instanceof CommentListFragment) {
                    CommentListPageFragment.this.LIZLLL.get(qz9.LJ).LIZJ.setTempEnterMethod(CommentListPageFragment.this.LJIJJ);
                }
                CommentListPageFragment.this.LJFF();
                CommentListPageFragment.this.LIZLLL.get(qz9.LJ).LIZ(true);
                CommentListPageFragment.this.LJIILL = false;
                CommentListPageFragment.this.LJIILLIIL = true;
            }

            public final void LIZIZ(Qz9 qz9) {
                String str;
                String str2;
                CommentListPageFragment commentListPageFragment = CommentListPageFragment.this;
                if (commentListPageFragment.LJ.get(qz9.LJ).intValue() != 2) {
                    str = "";
                } else {
                    str = "like_list";
                }
                commentListPageFragment.LJIJJ = str;
                if (CommentListPageFragment.this.LJIJI != 0) {
                    CommentListPageFragment commentListPageFragment2 = CommentListPageFragment.this;
                    if (commentListPageFragment2.LJIILL) {
                        str2 = "click_label";
                    } else {
                        str2 = "slide";
                    }
                    commentListPageFragment2.LIZ(str2, "change_tab", qz9.LJ, CommentListPageFragment.this.LJI());
                }
                CommentListPageFragment.this.LJFF();
                CommentListPageFragment.this.LIZLLL.get(qz9.LJ).LIZ(false);
            }
        });
        this.LJJIJ.setOnTabClickListener(new AnonymousClass9rA(this));
        if (LJIL()) {
            this.LJJIJ.setTabMargin(10);
        }
        LJIIJ();
        LIZ(this.LJIILIIL);
        LIZ();
    }

    public static CommentListPageFragment LIZ(AnonymousClass9ly r2, Aweme aweme, Context context) {
        Bundle bundle = new Bundle();
        bundle.putSerializable("id", r2);
        AnonymousClass9mF.LIZ(r2, aweme, context);
        CommentListPageFragment commentListPageFragment = new CommentListPageFragment();
        commentListPageFragment.setArguments(bundle);
        return commentListPageFragment;
    }

    public static CommentListPageFragment LIZ(Activity activity, Aweme aweme, AnonymousClass9ly r10) {
        if (!(activity == null || aweme == null || activity.isFinishing())) {
            long elapsedRealtime = SystemClock.elapsedRealtime();
            if (elapsedRealtime - LJIJJLI <= 300) {
                AnonymousClass9pE.LIZIZ("CommentListPageFragment: showCommentList(): cancel because open again too fast");
                return null;
            }
            LJIJJLI = elapsedRealtime;
            AnonymousClass9pE.LIZ("CommentListPageFragment: showCommentList() aid = " + aweme.getAid());
            try {
                boolean LIZJ2 = MSAdaptionService.LIZJ().LIZJ(activity);
                Fragment LIZ2 = MSAdaptionService.LIZJ().LIZ();
                if (!LIZJ2 || LIZ2 == null) {
                    1hK r8 = (1hK) activity;
                    0AA supportFragmentManager = r8.getSupportFragmentManager();
                    CommentListPageFragment LIZ3 = supportFragmentManager.LIZ("comment_page");
                    if (LIZ3 == null) {
                        AnonymousClass9rT.LIZ(true, r10.getEventType(), AnonymousClass9rT.LIZ(aweme, r10));
                        CommentListPageFragment LIZ4 = LIZ(r10, aweme, (Context) r8);
                        LIZ4.LIZIZ(aweme);
                        0AP LIZ5 = supportFragmentManager.LIZ();
                        LIZ5.LIZ(2131365380, LIZ4, "comment_page");
                        LIZ5.LIZJ();
                        return LIZ4;
                    }
                    AnonymousClass9rT.LIZ(false, r10.getEventType(), AnonymousClass9rT.LIZ(aweme, r10));
                    LIZ3.LIZIZ(aweme);
                    LIZ3.LIZIZ(r10);
                    LIZ3.LIZ();
                    return LIZ3;
                }
                0AA fragmentManager = LIZ2.getFragmentManager();
                CommentListPageFragment LIZ6 = fragmentManager.LIZ("comment_page");
                if (LIZ6 != null) {
                    0AP LIZ7 = fragmentManager.LIZ();
                    LIZ7.LIZ(LIZ6);
                    LIZ7.LIZJ();
                }
                AnonymousClass9rT.LIZ(true, r10.getEventType(), AnonymousClass9rT.LIZ(aweme, r10));
                CommentListPageFragment LIZ8 = LIZ(r10, aweme, LIZ2.getContext());
                LIZ8.LIZIZ(aweme);
                0AP LIZ9 = fragmentManager.LIZ();
                LIZ9.LIZ(2131364962, LIZ8, "comment_page");
                LIZ9.LIZJ();
                return LIZ8;
            } catch (Exception e) {
                3cv.LIZ("CommentListFragment.showCommentList() error in try/catch. ErrorMessage: " + e.getMessage());
                2kf.LIZ(e);
            }
        }
        return null;
    }

    /* JADX WARNING: Removed duplicated region for block: B:19:0x0149  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public android.view.View onCreateView(android.view.LayoutInflater r9, android.view.ViewGroup r10, android.os.Bundle r11) {
        /*
            r8 = this;
            r0 = 2131558783(0x7f0d017f, float:1.8742892E38)
            r5 = 0
            android.view.View r4 = X.0HH.LIZ(r9, r0, r10, r5)
            r0 = 2131369737(0x7f0a1f09, float:1.835946E38)
            android.view.View r0 = r4.findViewById(r0)
            com.ss.android.ugc.aweme.comment.widget.CommentNestedLayout r0 = (com.ss.android.ugc.aweme.comment.widget.CommentNestedLayout) r0
            r8.LJJ = r0
            r0 = 2131367567(0x7f0a168f, float:1.835506E38)
            android.view.View r0 = r4.findViewById(r0)
            r8.LJIL = r0
            r0 = 2131369691(0x7f0a1edb, float:1.8359367E38)
            android.view.View r0 = r4.findViewById(r0)
            X.0GZ r0 = (X.0GZ) r0
            r8.LIZJ = r0
            r0 = 2131364958(0x7f0a0c5e, float:1.8349768E38)
            android.view.View r0 = r4.findViewById(r0)
            android.view.ViewGroup r0 = (android.view.ViewGroup) r0
            r8.LJJIIZ = r0
            r0 = 2131373063(0x7f0a2c07, float:1.8366207E38)
            android.view.View r0 = r4.findViewById(r0)
            r8.LJJIJIIJI = r0
            r0 = 2131362572(0x7f0a030c, float:1.8344928E38)
            android.view.View r0 = r4.findViewById(r0)
            android.widget.ImageView r0 = (android.widget.ImageView) r0
            r8.LJJI = r0
            r0 = 2131363483(0x7f0a069b, float:1.8346776E38)
            android.view.View r0 = r4.findViewById(r0)
            r8.LJJIFFI = r0
            r0 = 2131370358(0x7f0a2176, float:1.836072E38)
            android.view.View r0 = r4.findViewById(r0)
            X.Qeg r0 = (X.Qeg) r0
            r8.LJJII = r0
            r0 = 2131362634(0x7f0a034a, float:1.8345054E38)
            android.view.View r0 = r4.findViewById(r0)
            X.4ZZ r0 = (X.4ZZ) r0
            r8.LJJIII = r0
            r0 = 2131362638(0x7f0a034e, float:1.8345062E38)
            android.view.View r0 = r4.findViewById(r0)
            X.Qeg r0 = (X.Qeg) r0
            r8.LJJIIJ = r0
            r0 = 2131370272(0x7f0a2120, float:1.8360546E38)
            android.view.View r0 = r4.findViewById(r0)
            X.4ZZ r0 = (X.4ZZ) r0
            r8.LJJIIJZLJL = r0
            r0 = 2131370991(0x7f0a23ef, float:1.8362004E38)
            android.view.View r0 = r4.findViewById(r0)
            X.Qz3 r0 = (X.Qz3) r0
            r8.LJJIJ = r0
            r0 = 2131363679(0x7f0a075f, float:1.8347174E38)
            android.view.View r0 = r4.findViewById(r0)
            android.view.ViewGroup r0 = (android.view.ViewGroup) r0
            r8.LJJIJIL = r0
            X.0GZ r1 = r8.LIZJ
            r0 = 3
            r1.setOffscreenPageLimit(r0)
            X.ATo r3 = new X.ATo
            android.content.Context r0 = r8.getContext()
            r3.<init>(r0)
            r8.LJJIIZI = r3
            X.0GZ r2 = r8.LIZJ
            java.lang.Class<X.0GZ> r1 = X.0GZ.class
            java.lang.String r0 = "mScroller"
            java.lang.reflect.Field r1 = r1.getDeclaredField(r0)     // Catch:{ Exception -> 0x00b4 }
            r0 = 1
            r1.setAccessible(r0)     // Catch:{ Exception -> 0x00b4 }
            r1.set(r2, r3)     // Catch:{ Exception -> 0x00b4 }
            goto L_0x00b8
        L_0x00b4:
            r0 = move-exception
            X.0HH.LIZ(r0)
        L_0x00b8:
            r0 = 2131370262(0x7f0a2116, float:1.8360526E38)
            android.view.View r0 = r4.findViewById(r0)
            X.Lrq r0 = (X.Lrq) r0
            r8.LJJIJL = r0
            com.ss.android.ugc.aweme.comment.widget.CommentNestedLayout r1 = r8.LJJ
            X.0GZ r0 = r8.LIZJ
            r1.setCommentContainer(r0)
            com.ss.android.ugc.aweme.comment.widget.CommentNestedLayout r1 = r8.LJJ
            X.9wc r0 = new X.9wc
            r0.<init>(r8)
            r1.setScrollableContainer(r0)
            com.ss.android.ugc.aweme.comment.widget.CommentNestedLayout r1 = r8.LJJ
            X.9wd r0 = new X.9wd
            r0.<init>(r8)
            r1.setVisibleChangedListener(r0)
            com.ss.android.ugc.aweme.comment.widget.CommentNestedLayout r1 = r8.LJJ
            X.9rC r0 = new X.9rC
            r0.<init>(r8)
            r1.setPreScrollChangeListener(r0)
            android.widget.ImageView r1 = r8.LJJI
            X.9we r0 = new X.9we
            r0.<init>(r8)
            r1.setOnClickListener(r0)
            X.0GZ r1 = r8.LIZJ
            com.ss.android.ugc.aweme.comment.ui.CommentListPageFragment$1 r0 = new com.ss.android.ugc.aweme.comment.ui.CommentListPageFragment$1
            r0.<init>()
            r1.addOnPageChangeListener(r0)
            boolean r0 = X.AnonymousClass9o8.LIZLLL()
            if (r0 == 0) goto L_0x0107
            X.Lrq r0 = r8.LJJIJL
            r0.setVisibility(r5)
        L_0x0107:
            boolean r0 = X.AnonymousClass9o8.LIZIZ()
            if (r0 == 0) goto L_0x015e
            android.view.ViewGroup r7 = r8.LJJIIZ
            android.content.Context r1 = r4.getContext()
            X.M12.LIZ(r1)
            boolean r0 = X.AnonymousClass9o8.LIZIZ()
            java.lang.String r6 = ""
            if (r0 == 0) goto L_0x016e
            android.content.res.Resources r0 = r1.getResources()
            kotlin.h.b.n.LIZIZ(r0, r6)
            android.util.DisplayMetrics r0 = r0.getDisplayMetrics()
            if (r0 == 0) goto L_0x016c
            int r0 = r0.heightPixels
        L_0x012d:
            if (r0 == 0) goto L_0x016e
            double r2 = (double) r0
            r0 = 4604750475001237340(0x3fe75c28f5c28f5c, double:0.73)
            double r2 = r2 * r0
            int r0 = (int) r2
        L_0x0137:
            X.C01899th.LIZ((android.view.View) r7, (int) r0)
            X.0GZ r2 = r8.LIZJ
            android.content.Context r1 = r4.getContext()
            X.M12.LIZ(r1)
            boolean r0 = X.AnonymousClass9o8.LIZIZ()
            if (r0 == 0) goto L_0x015f
            android.content.res.Resources r0 = r1.getResources()
            kotlin.h.b.n.LIZIZ(r0, r6)
            android.util.DisplayMetrics r0 = r0.getDisplayMetrics()
            if (r0 == 0) goto L_0x0158
            int r5 = r0.heightPixels
        L_0x0158:
            if (r5 == 0) goto L_0x015f
            r0 = -1
        L_0x015b:
            X.C01899th.LIZ((android.view.View) r2, (int) r0)
        L_0x015e:
            return r4
        L_0x015f:
            android.content.res.Resources r1 = r1.getResources()
            r0 = 2131165343(0x7f07009f, float:1.79449E38)
            float r0 = r1.getDimension(r0)
            int r0 = (int) r0
            goto L_0x015b
        L_0x016c:
            r0 = 0
            goto L_0x012d
        L_0x016e:
            r0 = -2
            goto L_0x0137
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.comment.ui.CommentListPageFragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):android.view.View");
    }
}
