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

import X.0Bs;
import X.0Bv;
import X.0Bx;
import X.0By;
import X.0CC;
import X.0GV;
import X.0Gf;
import X.0Gp;
import X.0HB;
import X.1hK;
import X.2EE;
import X.2GD;
import X.2GO;
import X.2HZ;
import X.2bX;
import X.2nK;
import X.2oJ;
import X.2oK;
import X.2oO;
import X.2oQ;
import X.2or;
import X.3P1;
import X.3PM;
import X.3Q9;
import X.3cl;
import X.3dU;
import X.3da;
import X.3rX;
import X.46i;
import X.4Bs;
import X.4lv;
import X.7UG;
import X.7df;
import X.7xA;
import X.878;
import X.8RI;
import X.8ZQ;
import X.9EH;
import X.9Y3;
import X.9oX;
import X.9u5;
import X.ATt;
import X.C1826Dfy;
import X.C3926EXa;
import X.C3934EXi;
import X.C4186Ecw;
import X.C4319Ef5;
import X.C4321Ef7;
import X.C4325EfB;
import X.C4331EfH;
import X.C4374Efy;
import X.C4379Eg3;
import X.C4554Eis;
import X.C4562Ej0;
import X.C4566Ej4;
import X.C4570Ej8;
import X.C4571Ej9;
import X.C4572EjA;
import X.C4576EjE;
import X.C4581EjJ;
import X.C4582EjK;
import X.C4583EjL;
import X.C4586EjO;
import X.C4589EjR;
import X.C4590EjS;
import X.C4592EjU;
import X.C4593EjV;
import X.C4595EjX;
import X.C4602Eje;
import X.C4638EkE;
import X.C4644EkK;
import X.C4649EkP;
import X.C4677Ekr;
import X.C4679Ekt;
import X.C4685Ekz;
import X.C4686El0;
import X.C4697ElB;
import X.C4773EmP;
import X.C4810En0;
import X.C4820EnA;
import X.C4829EnJ;
import X.C4989Ept;
import X.C5233Etp;
import X.C5380EwC;
import X.C5414Ewk;
import X.Cl7;
import X.CqM;
import X.Cz7;
import X.EXZ;
import X.F4I;
import X.FjH;
import X.HeD;
import X.ISm;
import X.LeS;
import X.Lth;
import X.M12;
import X.Mjy;
import X.OQZ;
import X.P8R;
import X.POl;
import X.Qw9;
import X.Rc9;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.SparseArray;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import com.bytedance.covode.number.Covode;
import com.bytedance.hox.Hox;
import com.ss.android.ugc.aweme.awemeservice.AwemeService;
import com.ss.android.ugc.aweme.feed.model.AutoRefreshFollowFeedLiveEvent;
import com.ss.android.ugc.aweme.feed.model.Aweme;
import com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT;
import com.ss.android.ugc.aweme.feed.vm.FollowFeedVM;
import com.ss.android.ugc.aweme.homepage.api.data.HomePageDataViewModel;
import com.ss.android.ugc.aweme.homepage.ui.slide.IXTabScrollProfileStrategy;
import com.ss.android.ugc.aweme.live.LiveOuterService;
import com.ss.android.ugc.aweme.profile.model.User;
import com.ss.android.ugc.aweme.services.NetworkStateServiceImpl;
import com.ss.android.ugc.aweme.story.userstory.mine.MineUserStoryFetcher;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import kotlin.h.b.n;
import kotlin.o.y;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.ThreadMode;

public class FeedFollowFragment extends BaseFeedListFragment implements C4829EnJ, C5380EwC, C5414Ewk, C4679Ekt, 2oJ, 2oK, 2oO, C4319Ef5, 3Q9, C4595EjX, 2HZ, 2GO {
    public C4572EjA LJIIL;
    public FrameLayout LJIILIIL;
    public C4374Efy LJIILJJIL;
    public boolean LJIILL = false;
    public FollowFeedFragmentPanelMT LJIIZILJ = new FollowFeedFragmentPanelMT("homepage_follow");
    public C4590EjS LJIJ = null;
    public Mjy LJJII = new Mjy();
    public int LJJIII = -1;
    public boolean LJJIIJ = true;
    public 2bX LJJIIJZLJL;
    public FrameLayout LJJIIZ;
    public TextView LJJIIZI;
    public boolean LJJIJ = false;
    public MineUserStoryFetcher LJJIJIIJI = new MineUserStoryFetcher((byte) 0);
    public C4554Eis LJJIJIIJIL;
    public FollowFeedVM LJJIJIL;
    public C4592EjU LJJIJL = null;
    public boolean LJJIJLIJ = false;

    static {
        Covode.recordClassIndex(79497);
    }

    public final String LJII() {
        return "FeedFollowFragment";
    }

    public final void LJIIJJI() {
    }

    public final boolean LJIJJLI() {
        return true;
    }

    public final Fragment LJIL() {
        return this;
    }

    public final void LJJIIJ() {
    }

    public final boolean LJJIJIIJI() {
        return true;
    }

    public Map<Integer, Object> getSubscriberEventTypes() {
        HashMap hashMap = new HashMap();
        hashMap.put(220, new Rc9(FeedFollowFragment.class, "onProfileFollow", ATt.class, ThreadMode.POSTING, 0, false));
        hashMap.put(52, new Rc9(FeedFollowFragment.class, "onAntiCrawlerEvent", C4686El0.class, ThreadMode.POSTING, 0, false));
        hashMap.put(221, new Rc9(FeedFollowFragment.class, "receiveJumpToRecord", C4810En0.class, ThreadMode.POSTING, 0, false));
        hashMap.put(222, new Rc9(FeedFollowFragment.class, "onAutoRefreshLive", AutoRefreshFollowFeedLiveEvent.class, ThreadMode.POSTING, 0, false));
        hashMap.put(223, new Rc9(FeedFollowFragment.class, "onLiveRoomScrollEvent", C4589EjR.class, ThreadMode.POSTING, 0, false));
        hashMap.put(224, new Rc9(FeedFollowFragment.class, "onVideoPublishEvent", C5233Etp.class, ThreadMode.POSTING, 0, false));
        hashMap.put(53, new Rc9(FeedFollowFragment.class, "onBlockUserEvent", 9oX.class, ThreadMode.POSTING, 0, false));
        hashMap.put(22, new Rc9(FeedFollowFragment.class, "onProfileFollowEvent", ATt.class, ThreadMode.POSTING, 0, false));
        hashMap.put(225, new Rc9(FeedFollowFragment.class, "onLeaveFollowFeedPage", 4Bs.class, ThreadMode.POSTING, 0, false));
        return hashMap;
    }

    public final void LJIILLIIL() {
        super.LJIILLIIL();
    }

    public final ViewGroup LJJIFFI() {
        return this.LJJIIZ;
    }

    public final boolean LIZ(boolean z) {
        return LIZ(z, z ? "homepage_refresh" : "pull_refresh");
    }

    public final boolean LIZ(boolean z, String str) {
        if ("refresh".equals(str)) {
            C4379Eg3.LJIIIIZZ.LIZ("following_tab");
        } else if ("homepage_refresh".equals(str)) {
            C4379Eg3.LJIIIIZZ.LIZ("home_tab");
        } else if ("pull_refresh".equals(str)) {
            C4379Eg3.LJIIIIZZ.LIZ("pull");
        }
        C4572EjA ejA = this.LJIIL;
        if (ejA != null) {
            ejA.LIZJ();
        }
        C4374Efy efy = this.LJIILJJIL;
        if (efy != null && this.LJIILL) {
            efy.LIZ("homepage_folllow_refresh");
        }
        0Gp.LIZ(new C4582EjK(this), 2nK.LIZ(), (0Gf) null);
        CqM.LIZ(new C4586EjO());
        if (!46i.LJFF().isLogin()) {
            this.LJIIZILJ.LJFF();
            CqM.LIZ(new C3934EXi("HOME"));
            return false;
        } else if (!super.LIZ(z)) {
            return false;
        } else {
            LJJIJLIJ();
            this.LJJIJIIJIL.LIZ(z);
            LJJJ().LIZ(true);
            this.LJJIII = 46i.LJFF().getCurUser().getFollowingCount();
            if (8ZQ.LIZ()) {
                F4I.LIZ.LIZIZ();
            }
            return true;
        }
    }

    private void LJJIJLIJ() {
        if (this.LJIIIZ != null) {
            LJJIL();
        }
    }

    public final String LIZJ() {
        return Qw9.LIZ(this);
    }

    public final boolean LJ() {
        return this.LJJIJIIJIL.LJ();
    }

    public final C3926EXa LJIIIIZZ() {
        return this.LJJIJIIJIL.LIZIZ;
    }

    public final boolean LJIIIZ() {
        LJJIJLIJ();
        return super.LJIIIZ();
    }

    public final void LJIILJJIL() {
        this.LJIIZILJ.LLJJJJJIL();
    }

    public final 2EE LJIJI() {
        return this.LJIIZILJ.LJLLL();
    }

    public final void LJJ() {
        3cl r0 = this.LIZ;
        if (r0 != null) {
            r0.LJFF();
        }
    }

    public final void LJJI() {
        3cl r0 = this.LIZ;
        if (r0 != null) {
            r0.LJ();
        }
    }

    public final boolean aD_() {
        M12.LIZ(this);
        return true;
    }

    private boolean LJJIJL() {
        if (9Y3.LIZ(9Y3.LIZ(), true, "i18n_following_live_skylight_type", 0) != 0) {
            return true;
        }
        return false;
    }

    private int LJJIL() {
        FollowFeedFragmentPanelMT followFeedFragmentPanelMT = this.LJIIZILJ;
        if (followFeedFragmentPanelMT != null) {
            return followFeedFragmentPanelMT.LLJJIJIIJIL();
        }
        return 0;
    }

    public final P8R LIZIZ() {
        return P8R.LIZ(getContext(), getActivity());
    }

    public final void LJI() {
        this.LJIIJ.setRefreshing(true);
        LIZ(false);
    }

    public final boolean LJIIJ() {
        this.LJJIJIIJIL.LIZIZ();
        return this.LJJIJIIJIL.LIZJ();
    }

    public final boolean LJIIL() {
        FollowFeedFragmentPanelMT followFeedFragmentPanelMT = this.LJIIZILJ;
        if (followFeedFragmentPanelMT == null || !followFeedFragmentPanelMT.LLJI()) {
            return false;
        }
        return true;
    }

    public final void LJIJ() {
        if (this.LJIILJJIL != null) {
            boolean aq_ = aq_();
        }
    }

    public final SparseArray<Lth> LJJIJ() {
        SparseArray<Lth> LJJIJ2 = FeedFollowFragment.super.LJJIJ();
        LJJIJ2.append(C4677Ekr.LIZJ, this.LJIIZILJ);
        return LJJIJ2;
    }

    public void onDestroy() {
        FeedFollowFragment.super.onDestroy();
        EventBus.LIZ().LIZIZ(this);
        this.LJJII.dispose();
    }

    public void onPause() {
        super.onPause();
        if (C4379Eg3.LIZLLL) {
            C4379Eg3.LIZIZ = System.currentTimeMillis();
        }
    }

    private void LJJIZ() {
        if (this.LJIILJJIL != null && aq_()) {
            LIZIZ(false, false);
            LJIJ();
        }
    }

    private FollowFeedVM LJJJ() {
        if (this.LJJIJIL == null) {
            this.LJJIJIL = LIZ(requireActivity()).LIZ(FollowFeedVM.class);
        }
        return this.LJJIJIL;
    }

    public final void LIZLLL() {
        C4773EmP emP = this.LJJIJIIJIL.LIZIZ.LJII;
        if (emP instanceof C4773EmP) {
            LIZ(emP);
        }
    }

    public final boolean LJJIIJZLJL() {
        3P1 LJ = LiveOuterService.LJJI().LJ();
        if (LJ != null) {
            return ((Boolean) LJ.LIZ("live_skylight_frequently_refresh", false)).booleanValue();
        }
        return false;
    }

    public final /* synthetic */ Object LJJIIZ() {
        2nK.LIZ("no_data_refresh_page", new HashMap<String, String>(NetworkStateServiceImpl.createINetworkStateServicebyMonsterPlugin(false).getEffectiveConnectionType()) {
            public final /* synthetic */ int val$networkLevel;

            static {
                Covode.recordClassIndex(79502);
            }

            {
                this.val$networkLevel = r4;
                StringBuilder sb = new StringBuilder();
                sb.append(r4);
                put("network_status", sb.toString());
                put("enter_from", "homepage_hot");
            }
        });
        return null;
    }

    public final void ct_() {
        LJJIJLIJ();
        this.LJJIJIIJIL.LIZJ();
        if (8ZQ.LIZ()) {
            F4I.LIZ.LIZIZ();
        }
    }

    public final void LJJII() {
        if (this.LJIILJJIL != null) {
            LJ(true);
            this.LJIILJJIL.LIZ((List<C4325EfB>) new ArrayList());
            LJJIZ();
            FrameLayout frameLayout = this.LJIILIIL;
            if (frameLayout != null) {
                LIZ(frameLayout, false, false);
            }
        }
        C4379Eg3.LIZJ = System.currentTimeMillis();
    }

    public final void LJJIII() {
        if (this.LJIILJJIL != null) {
            LJ(true);
            this.LJIILJJIL.LIZ((List<C4325EfB>) new ArrayList());
            LJJIZ();
            FrameLayout frameLayout = this.LJIILIIL;
            if (frameLayout != null) {
                LIZ(frameLayout, false, false);
            }
            C4379Eg3.LJIIIIZZ.LIZIZ();
        }
    }

    public final /* synthetic */ Object LJJIIZI() {
        T t;
        EXZ exz;
        int effectiveConnectionType = NetworkStateServiceImpl.createINetworkStateServicebyMonsterPlugin(false).getEffectiveConnectionType();
        2nK.LIZ("refresh_homepage_follow", new HashMap<String, String>(effectiveConnectionType) {
            public final /* synthetic */ int val$networkLevel;

            static {
                Covode.recordClassIndex(79500);
            }

            {
                this.val$networkLevel = r4;
                StringBuilder sb = new StringBuilder();
                sb.append(r4);
                put("network_status", sb.toString());
            }
        });
        C4554Eis eis = this.LJJIJIIJIL;
        if (!(eis == null || (t = eis.LIZIZ) == null || (exz = t.LJII) == null || !(exz instanceof C4773EmP) || !exz.isDataEmpty())) {
            2nK.LIZ("no_data_refresh_page", new HashMap<String, String>(effectiveConnectionType) {
                public final /* synthetic */ int val$networkLevel;

                static {
                    Covode.recordClassIndex(79501);
                }

                {
                    this.val$networkLevel = r4;
                    StringBuilder sb = new StringBuilder();
                    sb.append(r4);
                    put("network_status", sb.toString());
                    put("enter_from", "homepage_hot");
                }
            });
        }
        return null;
    }

    public final boolean aC_() {
        if (!getLifecycle().LIZ().isAtLeast(0CC.CREATED)) {
            return false;
        }
        if (Hox.LJ.LIZ(getActivity()).LIZLLL("Following")) {
            return true;
        }
        return false;
    }

    public void onDestroyView() {
        super.onDestroyView();
        this.LJIIZILJ.LJIJ();
        C4374Efy efy = this.LJIILJJIL;
        if (efy != null) {
            C4321Ef7 ef7 = efy.LIZ;
            if (ef7 == null) {
                n.LIZ("");
            }
            ef7.LIZ.dispose();
        }
        C4590EjS ejS = this.LJIJ;
        if (ejS != null) {
            ejS.LIZ();
        }
    }

    public final void cu_() {
        C4374Efy efy;
        if (LJJIJL() && (efy = this.LJIILJJIL) != null) {
            if (efy.LIZJ.size() == 0) {
                LJJIZ();
            } else if (!this.LJJIJ && this.LJIILJJIL != null && aq_() && LJJIJL()) {
                LIZIZ(true, false);
                LJIJ();
            }
        }
        C4773EmP emP = this.LJJIJIIJIL.LIZIZ.LJII;
        if (emP instanceof C4773EmP) {
            C4773EmP emP2 = emP;
            LIZ(emP2);
            boolean isDataEmpty = emP2.isDataEmpty();
            IXTabScrollProfileStrategy LIZ = C4989Ept.LIZ.getXTabScrollProfileVM(requireActivity()).LIZ("Following");
            if (LIZ != null) {
                LIZ.LIZ(isDataEmpty);
            }
            LJJJ().LIZIZ = isDataEmpty;
            if (isDataEmpty) {
                0Gp.LIZ(new C4583EjL(this), 2nK.LIZ(), (0Gf) null);
            }
        }
    }

    public void onResume() {
        String str;
        super.onResume();
        if (this.LJJIII == -1) {
            this.LJJIII = 46i.LJFF().getCurUser().getFollowingCount();
        }
        if (getUserVisibleHint() && isResumed() && this.LJJ != null && !this.LJJ.isHidden() && C4638EkE.LIZ()) {
            7xA.LIZ(C4602Eje.FOLLOW);
            if (!this.LJJIIJ) {
                C4566Ej4 ej4 = this.LJJ;
                if (ej4 instanceof C4566Ej4) {
                    str = ej4.LJIJJ();
                } else {
                    str = null;
                }
                0Gp.LIZ(new C4186Ecw(this, str), 2nK.LIZ(), (0Gf) null);
            }
            this.LJJIIJ = false;
        }
        getActivity().getWindow().setBackgroundDrawableResource(2131099677);
        if (this.LJJIJLIJ) {
            this.LJJIJLIJ = false;
        }
        C4379Eg3 eg3 = C4379Eg3.LJIIIIZZ;
        if (C4379Eg3.LIZLLL) {
            eg3.LIZ();
            eg3.LJIIIIZZ();
        }
    }

    @ISm
    public void receiveJumpToRecord(C4810En0 en0) {
        this.LJJIJLIJ = true;
    }

    public void setUserVisibleHint(boolean z) {
        FeedFollowFragment.super.setUserVisibleHint(z);
    }

    @ISm
    public void onProfileFollow(ATt aTt) {
        C4572EjA ejA = this.LJIIL;
        if (ejA != null) {
            ejA.LIZ(aTt);
        }
    }

    public static 0Bx LIZ(1hK r2) {
        0Bx LIZ = 0By.LIZ(r2, (0Bv) null);
        if (2GD.LIZ) {
            0Bs.LIZ(LIZ, r2);
        }
        return LIZ;
    }

    private void LJ(boolean z) {
        if (this.LJJIJL == null) {
            this.LJJIJL = C4989Ept.LIZ.getSlideGuideViewModel(requireActivity());
        }
        C4592EjU ejU = this.LJJIJL;
        if (ejU != null) {
            ejU.LIZ(z);
        }
    }

    @ISm
    public void onAntiCrawlerEvent(C4686El0 el0) {
        String str = el0.LIZ;
        if (str != null && str.contains("/aweme/v2/follow/feed/?")) {
            EventBus.LIZ().LIZLLL(el0);
            LIZ(false);
        }
    }

    @ISm
    public void onBlockUserEvent(9oX r3) {
        User user = r3.LIZ;
        C4374Efy efy = this.LJIILJJIL;
        if (efy != null && user != null && efy.LIZIZ(user.getUid()) == 0) {
            LJJIZ();
        }
    }

    private void LIZ(C4773EmP emP) {
        Aweme aweme;
        int i = emP.LJ;
        List<Aweme> awemeList = emP.getAwemeList();
        if (i > 0 && awemeList != null && i < awemeList.size() && (aweme = awemeList.get(i)) != null) {
            String aid = aweme.getAid();
            Cz7.LJIJJLI = aid;
            emP.LJ = -1;
            3PM.LIZIZ("GuideFYPAssem", "set guide index: " + i + ",aid:" + aid);
        }
    }

    public final void LIZLLL(boolean z) {
        super.LIZLLL(z);
        CqM.LIZ(new C4697ElB(2, this.LJIIZILJ.LJLLLL(), this.LJIIZILJ));
        C4572EjA ejA = this.LJIIL;
        if (ejA != null) {
            ejA.onPause();
        }
        this.LJIIZILJ.LJIILJJIL(z);
        8RI.LJ(false);
        C4379Eg3.LIZLLL = false;
        C4379Eg3.LIZIZ = System.currentTimeMillis();
        C4379Eg3.LJI = C4379Eg3.LJFF;
    }

    @ISm
    public void onAutoRefreshLive(AutoRefreshFollowFeedLiveEvent autoRefreshFollowFeedLiveEvent) {
        if (autoRefreshFollowFeedLiveEvent != null) {
            if (autoRefreshFollowFeedLiveEvent.isOpenWindow) {
                LIZIZ(true, true);
                LIZ(this.LJIILIIL, false, true);
            }
            if (this.LJIILJJIL != null && this.LJIILL && autoRefreshFollowFeedLiveEvent.isRefreshLive) {
                this.LJIILJJIL.LIZ("homepage_folllow_refresh");
            }
        }
    }

    @ISm
    public void onLeaveFollowFeedPage(4Bs r7) {
        if (this.LJJIJ) {
            C4374Efy efy = this.LJIILJJIL;
            String str = r7.LIZ;
            M12.LIZ(str);
            for (C4325EfB efB : efy.LIZJ) {
                if (y.LIZ(str, efB.getUser().getUid(), true)) {
                    efB.setShowBluePoint(false);
                }
            }
            efy.LIZ();
        }
    }

    @ISm
    public void onProfileFollowEvent(ATt aTt) {
        if (this.LJIILJJIL != null && aTt.LIZ == 0 && aTt.LIZIZ != null && (aTt.LIZIZ instanceof User) && this.LJIILJJIL.LIZIZ(((User) aTt.LIZIZ).getUid()) == 0) {
            LJJIZ();
        }
    }

    public final OQZ LIZ(Context context) {
        C4649EkP ekP = new C4649EkP(context);
        ekP.LIZ(C4581EjJ.LIZ, new C4576EjE(this), new C4644EkK(this));
        ekP.LIZLLL(1);
        ekP.setUseScreenHeight(getContext().getResources().getDimensionPixelSize(2131165737));
        return ekP;
    }

    @ISm
    public void onLiveRoomScrollEvent(C4589EjR ejR) {
        C4374Efy efy = this.LJIILJJIL;
        M12.LIZ(ejR);
        9u5 r8 = efy.LIZIZ;
        if (r8 == null) {
            n.LIZ("");
        }
        long j = ejR.LIZ;
        if (j >= 0) {
            C4331EfH efH = r8.LIZJ;
            if (efH == null) {
                n.LIZ("");
            }
            List data = efH.getData();
            n.LIZIZ(data, "");
            int i = 0;
            for (Object next : data) {
                int i2 = i + 1;
                if (i < 0) {
                    LeS.LIZIZ();
                }
                C4325EfB efB = (C4325EfB) next;
                if (!(efB instanceof C4325EfB) || efB.getUser().roomId != j) {
                    i = i2;
                } else if (i > 0) {
                    r8.LIZ(i - 1);
                    return;
                } else {
                    r8.LIZ(i);
                    return;
                }
            }
        }
    }

    public final void LIZ(FjH fjH) {
        C4572EjA LIZ = C1826Dfy.LIZ.LIZ((Fragment) this, this.LJIJJLI, (C5414Ewk) this);
        this.LJIIL = LIZ;
        this.LJIIZILJ.LIZ = LIZ;
        this.LIZJ.LIZ((int) HeD.LIZIZ(getActivity(), 49.0f), (int) HeD.LIZIZ(getActivity(), 113.0f));
        this.LJIIJ = new 3da(this.LIZJ);
        this.LJIIZILJ.LIZ(new 0GV() {
            static {
                Covode.recordClassIndex(79498);
            }

            public final void LIZ(int i, float f, int i2) {
            }

            public final void LIZIZ(int i) {
            }

            /* JADX WARNING: Code restructure failed: missing block: B:7:0x0016, code lost:
                if (r4 == (r3.LIZ.LJIIZILJ.LJJLIIIJJI.LIZIZ() - 1)) goto L_0x0018;
             */
            /* Code decompiled incorrectly, please refer to instructions dump. */
            public final void e_(int r4) {
                /*
                    r3 = this;
                    boolean r0 = X.8ZQ.LIZ()
                    if (r0 == 0) goto L_0x0033
                    r1 = 1
                    if (r4 == 0) goto L_0x0018
                    if (r4 <= 0) goto L_0x002c
                    com.ss.android.ugc.aweme.feed.ui.FeedFollowFragment r0 = com.ss.android.ugc.aweme.feed.ui.FeedFollowFragment.this     // Catch:{ Exception -> 0x002f }
                    com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r0.LJIIZILJ     // Catch:{ Exception -> 0x002f }
                    X.2mC r0 = r0.LJJLIIIJJI     // Catch:{ Exception -> 0x002f }
                    int r0 = r0.LIZIZ()     // Catch:{ Exception -> 0x002f }
                    int r0 = r0 - r1
                    if (r4 != r0) goto L_0x002c
                L_0x0018:
                    java.lang.Boolean r2 = java.lang.Boolean.valueOf(r1)     // Catch:{ Exception -> 0x002f }
                    boolean r0 = X.8ZQ.LIZ()     // Catch:{ Exception -> 0x002f }
                    if (r0 == 0) goto L_0x002e
                    java.util.concurrent.atomic.AtomicBoolean r1 = X.8RI.LIZLLL     // Catch:{ Exception -> 0x002f }
                    boolean r0 = r2.booleanValue()     // Catch:{ Exception -> 0x002f }
                    r1.set(r0)     // Catch:{ Exception -> 0x002f }
                    goto L_0x002e
                L_0x002c:
                    r1 = 0
                    goto L_0x0018
                L_0x002e:
                    return
                L_0x002f:
                    r0 = move-exception
                    X.0HH.LIZ(r0)
                L_0x0033:
                    return
                */
                throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.feed.ui.FeedFollowFragment.AnonymousClass1.e_(int):void");
            }
        });
    }

    public final void LIZIZ(Bundle bundle) {
        String string = bundle.getString(C4820EnA.LIZIZ, "");
        String LJFF = Hox.LJ.LIZ(getActivity()).LJFF("Following");
        String LJFF2 = Hox.LJ.LIZ(getActivity()).LJFF(LJFF);
        String LJFF3 = Hox.LJ.LIZ(getActivity()).LJFF(LJFF2);
        if (string.equals(C4820EnA.LJ) || bundle.getBoolean(LJFF)) {
            this.LJIIZILJ.LIZLLL(false);
            CqM.LIZ(new 7UG(false));
            LIZLLL(false);
        } else if (string.equals(C4820EnA.LIZLLL) || bundle.getBoolean(LJFF2)) {
            this.LJIIZILJ.LIZLLL(false);
            LIZLLL(true);
        } else if (string.equals(C4820EnA.LIZJ) || bundle.getBoolean(LJFF3)) {
            2EE LJLLL = this.LJIIZILJ.LJLLL();
            if (LJLLL != null) {
                LJLLL.LIZIZ(1);
            }
            Aweme aweme = HomePageDataViewModel.LJIILJJIL.LIZ(getActivity()).LJIIJ;
            if (aweme != null) {
                3dU.LIZ.LIZ(aweme.getAid());
            }
            this.LJIIZILJ.LLIIJLIL();
        }
    }

    public final void LIZ(Bundle bundle) {
        String string = bundle.getString(C4820EnA.LIZIZ, "");
        String LJFF = Hox.LJ.LIZ(getActivity()).LJFF("Following");
        String LJFF2 = Hox.LJ.LIZ(getActivity()).LJFF(LJFF);
        String LJFF3 = Hox.LJ.LIZ(getActivity()).LJFF(LJFF2);
        if (string.equals(C4820EnA.LJ) || bundle.getBoolean(LJFF)) {
            this.LJIIZILJ.LIZLLL(true);
            if (isResumed() && this.LJJ != null && !this.LJJ.isHidden()) {
                7xA.LIZ(C4602Eje.FOLLOW);
                C4571Ej9 ej9 = new C4571Ej9();
                ej9.LIZ = "homepage_follow";
                ej9.LJFF();
            }
            if (this.LJJIJ) {
                CqM.LIZ(new 7UG(true));
            }
            LIZJ(false);
        } else if (string.equals(C4820EnA.LIZLLL) || bundle.getBoolean(LJFF2)) {
            this.LJIIZILJ.LIZLLL(true);
            if (isResumed() && this.LJJ != null && !this.LJJ.isHidden()) {
                7xA.LIZ(C4602Eje.FOLLOW);
                C4571Ej9 ej92 = new C4571Ej9();
                ej92.LIZ = "homepage_follow";
                ej92.LJFF();
            }
            if (this.LJJIJ) {
                CqM.LIZ(new 7UG(true));
            }
            LIZJ(true);
        } else if (string.equals(C4820EnA.LIZJ) || bundle.getBoolean(LJFF3)) {
            this.LJIIZILJ.LIZLLL(true);
            if (isResumed() && this.LJJ != null && !this.LJJ.isHidden()) {
                7xA.LIZ(C4602Eje.FOLLOW);
                C4571Ej9 ej93 = new C4571Ej9();
                ej93.LIZ = "homepage_follow";
                ej93.LJFF();
            }
            if (this.LJJIJ) {
                CqM.LIZ(new 7UG(true));
            }
            LIZJ(true);
            2EE LJLLL = this.LJIIZILJ.LJLLL();
            if (LJLLL != null) {
                LJLLL.LIZIZ(1);
            }
            Aweme aweme = HomePageDataViewModel.LJIILJJIL.LIZ(getActivity()).LJIIJ;
            if (aweme != null) {
                3dU.LIZ.LIZ(aweme.getAid());
            }
        }
    }

    /* JADX WARNING: Code restructure failed: missing block: B:40:0x00ce, code lost:
        if (r5.LJ() == false) goto L_0x00f9;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:42:0x00d6, code lost:
        if (r6.LJJIJIIJIL.LIZLLL() == false) goto L_0x00f9;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LIZJ(boolean r7) {
        /*
            r6 = this;
            X.Eg3 r0 = X.C4379Eg3.LJIIIIZZ
            r0.LIZ()
            boolean r0 = r6.getUserVisibleHint()
            if (r0 == 0) goto L_0x0011
            boolean r0 = r6.aq_()
            if (r0 != 0) goto L_0x0012
        L_0x0011:
            return
        L_0x0012:
            r4 = 1
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r4)
            X.8RI.LJ(r0)
            X.EjA r0 = r6.LJIIL
            if (r0 == 0) goto L_0x0021
            r0.onResume()
        L_0x0021:
            super.LIZJ(r7)
            X.ElB r2 = new X.ElB
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r6.LJIIZILJ
            com.ss.android.ugc.aweme.feed.model.Aweme r1 = r0.LJLLLL()
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r6.LJIIZILJ
            r2.<init>(r4, r1, r0)
            X.CqM.LIZ(r2)
            if (r7 == 0) goto L_0x008e
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r6.LJIIZILJ
            r0.LJJIIZ()
        L_0x003b:
            boolean r0 = r6.LJJIJ
            if (r0 == 0) goto L_0x0059
            X.2UX r2 = new X.2UX
            r2.<init>()
            java.lang.String r1 = "enter_from"
            java.lang.String r0 = "homepage_hot"
            r2.LIZ(r1, r0)
            java.lang.String r1 = "is_live"
            java.lang.String r0 = "1"
            r2.LIZ(r1, r0)
            java.util.Map r1 = r2.LIZ
            java.lang.String r0 = "enter_following_window_feed"
            X.2nK.LIZ(r0, r1)
        L_0x0059:
            r6.LJJIJIL()
            X.1hK r0 = r6.getActivity()
            android.view.Window r1 = r0.getWindow()
            r0 = 2131099677(0x7f06001d, float:1.7811714E38)
            r1.setBackgroundDrawableResource(r0)
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r6.LJIIZILJ
            if (r0 == 0) goto L_0x0074
            com.ss.android.ugc.aweme.feed.model.Aweme r0 = r0.LJLLLL()
            X.C4189Ecz.LJ = r0
        L_0x0074:
            X.Efy r0 = r6.LJIILJJIL
            if (r0 == 0) goto L_0x0011
            boolean r0 = r6.LJIILL
            if (r0 == 0) goto L_0x0011
            boolean r0 = r6.LJJIIJZLJL()
            if (r0 == 0) goto L_0x0011
            boolean r0 = r6.LJJIJ
            if (r0 == 0) goto L_0x0011
            X.Efy r1 = r6.LJIILJJIL
            java.lang.String r0 = "homepage_folllow_refresh"
            r1.LIZ((java.lang.String) r0)
            goto L_0x0011
        L_0x008e:
            r3 = 0
            X.OQZ r5 = r6.LIZIZ(r3)
            int r0 = r6.LJJIII
            if (r0 != 0) goto L_0x0100
            com.ss.android.ugc.aweme.IAccountUserService r0 = X.46i.LJFF()
            com.ss.android.ugc.aweme.profile.model.User r0 = r0.getCurUser()
            int r0 = r0.getFollowingCount()
            if (r0 <= 0) goto L_0x0100
            X.Eis r0 = r6.LJJIJIIJIL
            boolean r0 = r0.LIZLLL()
            if (r0 == 0) goto L_0x0100
            r0 = 1
        L_0x00ae:
            r2 = 41
            r1 = 40
            if (r0 != 0) goto L_0x00d8
            int[] r0 = new int[r4]
            r0[r3] = r1
            boolean r0 = X.C5116Erw.LIZJ(r0)
            if (r0 != 0) goto L_0x00d8
            int[] r0 = new int[r4]
            r0[r3] = r2
            boolean r0 = X.C5116Erw.LIZJ(r0)
            if (r0 != 0) goto L_0x00d8
            if (r5 == 0) goto L_0x00d0
            boolean r0 = r5.LJ()
            if (r0 == 0) goto L_0x00f9
        L_0x00d0:
            X.Eis r0 = r6.LJJIJIIJIL
            boolean r0 = r0.LIZLLL()
            if (r0 == 0) goto L_0x00f9
        L_0x00d8:
            r6.LIZ((boolean) r3)
            int[] r0 = new int[r4]
            r0[r3] = r1
            X.C5116Erw.LIZLLL(r0)
            int[] r0 = new int[r4]
            r0[r3] = r2
            X.C5116Erw.LIZLLL(r0)
            X.Eb2 r0 = new X.Eb2
            r0.<init>((int) r1)
            X.CqM.LIZ(r0)
            X.Eb2 r0 = new X.Eb2
            r0.<init>((int) r2)
            X.CqM.LIZ(r0)
        L_0x00f9:
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r6.LJIIZILJ
            r0.LLJJI()
            goto L_0x003b
        L_0x0100:
            r0 = 0
            goto L_0x00ae
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.feed.ui.FeedFollowFragment.LIZJ(boolean):void");
    }

    @ISm
    public void onVideoPublishEvent(C5233Etp etp) {
        Aweme LIZ;
        Aweme LIZ2;
        if (C4685Ekz.LIZ.LJIILIIL() || etp.LIZ != 15) {
            return;
        }
        if (C4562Ej0.LIZ() || (C4562Ej0.LIZIZ() && C4570Ej8.LIZ())) {
            3rX.LIZIZ = true;
            if (etp.LIZIZ instanceof Aweme) {
                Aweme aweme = (Aweme) etp.LIZIZ;
                int followerCount = aweme.getAuthor().getFollowerCount();
                if (C4562Ej0.LIZIZ(aweme) || (C4562Ej0.LIZIZ() && C4570Ej8.LIZIZ(followerCount))) {
                    if (Cl7.LJ(aweme)) {
                        LIZ2 = aweme;
                    } else {
                        LIZ2 = AwemeService.LIZIZ().LIZ(aweme);
                        if (LIZ2 == null) {
                            return;
                        }
                    }
                    if (!4lv.LIZ.LIZLLL(LIZ2)) {
                        if (Cl7.LJ(aweme)) {
                            this.LJJIJIIJIL.LIZ(this.LJJIJIIJI.LIZ());
                        } else {
                            this.LJJIJIIJIL.LIZ((Object) LIZ2);
                        }
                        OQZ LIZIZ = LIZIZ(true);
                        if (LIZIZ != null) {
                            LIZIZ.LIZLLL();
                        }
                        C4572EjA ejA = this.LJIIL;
                        if (ejA != null) {
                            ejA.LIZJ();
                        }
                    }
                }
            } else if (etp.LIZIZ instanceof List) {
                boolean z = false;
                for (Aweme aweme2 : POl.LIZ((List) etp.LIZIZ)) {
                    int followerCount2 = aweme2.getAuthor().getFollowerCount();
                    if (C4562Ej0.LIZIZ(aweme2) || (C4562Ej0.LIZIZ() && C4570Ej8.LIZIZ(followerCount2))) {
                        if (Cl7.LJ(aweme2)) {
                            LIZ = aweme2;
                        } else {
                            LIZ = AwemeService.LIZIZ().LIZ(aweme2);
                            if (LIZ == null) {
                            }
                        }
                        if (!4lv.LIZ.LIZLLL(LIZ)) {
                            if (Cl7.LJ(aweme2)) {
                                this.LJJIJIIJIL.LIZ(this.LJJIJIIJI.LIZ());
                            } else {
                                this.LJJIJIIJIL.LIZ((Object) LIZ);
                            }
                            z = true;
                        }
                    }
                }
                if (z) {
                    OQZ LIZIZ2 = LIZIZ(true);
                    if (LIZIZ2 != null) {
                        LIZIZ2.LIZLLL();
                    }
                    C4572EjA ejA2 = this.LJIIL;
                    if (ejA2 != null) {
                        ejA2.LIZJ();
                    }
                }
            }
        }
    }

    public final void LIZ(KeyEvent keyEvent) {
        super.LIZ(keyEvent);
        if (keyEvent.getAction() != 1 || keyEvent.getKeyCode() != 62 || this.LJIIZILJ == null) {
            return;
        }
        if (7df.LJJJI().LJIILJJIL()) {
            7df.LJJJI().LJJIII();
            this.LJIIZILJ.LJLJLLL();
            return;
        }
        7df.LJJJI().LJJI();
        this.LJIIZILJ.LJLJL();
    }

    public final void LIZ(List<C4325EfB> list) {
        if (this.LJIILJJIL != null && aq_()) {
            this.LJIILL = true;
            LJ(878.LIZ(list));
            this.LJIILJJIL.LIZ(list);
            this.LJJIIZI.setText(9EH.LJJIFFI.LIZ().getResources().getQuantityString(2131689711, list.size(), new Object[]{Integer.valueOf(list.size())}));
            if (!(list.size() <= 0 || list.get(0) == null || list.get(0).getLogPbBean() == null)) {
                String imprId = list.get(0).getLogPbBean().getImprId();
                if (imprId == null) {
                    imprId = "";
                }
                C4379Eg3.LJII = imprId;
            }
            LIZIZ(true, false);
            LJIJ();
            LIZ(this.LJIILIIL, false, true);
            C4379Eg3.LJIIIIZZ.LIZIZ();
        }
    }

    public final void LIZIZ(boolean z, boolean z2) {
        if (this.LJIILJJIL != null && aq_()) {
            int LIZIZ = this.LJIILJJIL.LIZIZ();
            if (z) {
                this.LJIIZILJ.LIZLLL();
                this.LJIILJJIL.LIZ(this.LJJIIJZLJL, 0.0f, (float) LIZIZ, z2);
                this.LJJIIJZLJL.setNeedIntercept(true);
                CqM.LIZ(new 7UG(true));
            } else {
                this.LJIIZILJ.LJII();
                this.LJIILJJIL.LIZ(this.LJJIIJZLJL, (float) LIZIZ, 0.0f, z2);
                this.LJJIIJZLJL.setNeedIntercept(false);
                CqM.LIZ(new 7UG(false));
            }
            2oQ.LIZ().LIZIZ(z);
            C4379Eg3.LJIIIIZZ.LIZ(z, this.LJJIJ, this.LJIILJJIL.LIZ(getContext()));
            if (z && !this.LJJIJ) {
                C4379Eg3.LJIIIIZZ.LJI();
                C4379Eg3.LJIIIIZZ.LJII();
            }
            this.LJJIJ = z;
            C4593EjV.LIZ = z;
        }
    }

    /* JADX WARNING: Code restructure failed: missing block: B:38:0x01c0, code lost:
        if (X.46i.LJFF().isLogin() == false) goto L_0x01c2;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void onViewCreated(android.view.View r11, android.os.Bundle r12) {
        /*
            r10 = this;
            r9 = 8672(0x21e0, float:1.2152E-41)
            com.bytedance.frameworks.apm.trace.MethodCollector.i(r9)
            X.Eis r0 = r10.LJJIJIIJIL
            if (r0 != 0) goto L_0x0015
            X.Eim r1 = new X.Eim
            X.EXc r0 = new X.EXc
            r0.<init>()
            r1.<init>(r10, r0)
            r10.LJJIJIIJIL = r1
        L_0x0015:
            X.Eis r0 = r10.LJJIJIIJIL
            r10.LJJIJIIJIL = r0
            super.onViewCreated(r11, r12)
            r10.LJJIJIL()
            r0 = 2131364965(0x7f0a0c65, float:1.8349782E38)
            android.view.View r0 = r11.findViewById(r0)
            X.2bX r0 = (X.2bX) r0
            r10.LJJIIJZLJL = r0
            r0 = 2131365037(0x7f0a0cad, float:1.8349928E38)
            android.view.View r0 = r11.findViewById(r0)
            android.widget.FrameLayout r0 = (android.widget.FrameLayout) r0
            r10.LJJIIZ = r0
            r0 = 2131365036(0x7f0a0cac, float:1.8349926E38)
            android.view.View r0 = r11.findViewById(r0)
            android.widget.FrameLayout r0 = (android.widget.FrameLayout) r0
            r10.LJIILIIL = r0
            r0 = 2131372329(0x7f0a2929, float:1.8364718E38)
            android.view.View r0 = r11.findViewById(r0)
            android.widget.TextView r0 = (android.widget.TextView) r0
            r10.LJJIIZI = r0
            android.widget.FrameLayout r1 = r10.LJIILIIL
            X.Eiv r0 = new X.Eiv
            r0.<init>(r10)
            r1.setOnClickListener(r0)
            X.TnV r1 = new X.TnV
            r1.<init>()
            java.lang.String r0 = "homepage_follow"
            r1.setEventType(r0)
            r4 = 1
            r1.setPageType(r4)
            java.lang.String r0 = "follow_button"
            r1.setPreviousPagePosition(r0)
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r10.LJIIZILJ
            r0.LIZ(r1)
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r10.LJIIZILJ
            r0.LIZ(r11, r12)
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r10.LJIIZILJ
            r0.LIZ(r10)
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r10.LJIIZILJ
            r0.LIZIZ = r10
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r10.LJIIZILJ
            r0.LIZ(r10)
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r10.LJIIZILJ
            r0.LJLJJL = r10
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r10.LJIIZILJ
            r0.LIZJ = r10
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r10.LJIIZILJ
            r0.LIZLLL = r10
            T r1 = r10.LJIIIZ
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r10.LJIIZILJ
            r1.a_(r0)
            X.Eis r1 = r10.LJJIJIIJIL
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r10.LJIIZILJ
            r1.LIZ((X.8RG) r0)
            T r1 = r10.LJIIIZ
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r10.LJIIZILJ
            r1.LIZ((X.C4506Ei6) r0)
            X.Eis r0 = r10.LJJIJIIJIL
            r0.LIZ()
            r10.LJJIJLIJ()
            androidx.fragment.app.Fragment r1 = r10.LJJ
            boolean r0 = r1 instanceof X.C4566Ej4
            r3 = 0
            if (r0 == 0) goto L_0x0218
            X.Ej4 r1 = (X.C4566Ej4) r1
            X.En4 r0 = r1.LJIJ()
            if (r0 == 0) goto L_0x020f
            java.lang.String r3 = r0.LIZ()
            java.lang.String r2 = r0.LIZIZ()
            java.lang.String r1 = r0.LIZJ()
        L_0x00c4:
            com.ss.android.ugc.aweme.IAccountUserService r0 = X.46i.LJFF()
            boolean r0 = r0.isLogin()
            if (r0 == 0) goto L_0x0208
            X.Eis r0 = r10.LJJIJIIJIL
            r0.LIZ(r3, r2, r1)
        L_0x00d3:
            X.2oQ r0 = X.2oQ.LIZ()
            r5 = 0
            r0.LIZIZ(r5)
            boolean r0 = r10.LJJIJL()
            java.lang.String r2 = ""
            if (r0 == 0) goto L_0x01c2
            X.Eg3 r1 = X.C4379Eg3.LJIIIIZZ
            java.lang.String r0 = "following_tab"
            r1.LIZ((java.lang.String) r0)
            android.content.Context r1 = r11.getContext()
            X.Efy r7 = new X.Efy
            r7.<init>()
            r10.LJIILJJIL = r7
            X.M12.LIZ(r1, r10, r10)
            X.Ef7 r0 = new X.Ef7
            r0.<init>(r10)
            r7.LIZ = r0
            X.9u5 r0 = new X.9u5
            r0.<init>(r1)
            r7.LIZIZ = r0
            android.view.ViewGroup r0 = r10.LJJIFFI()
            r0.removeAllViews()
            X.9u5 r0 = r7.LIZIZ
            if (r0 != 0) goto L_0x0114
            kotlin.h.b.n.LIZ(r2)
        L_0x0114:
            android.view.ViewGroup$LayoutParams r6 = r0.getLayoutParams()
            java.lang.String r3 = "null cannot be cast to non-null type android.view.ViewGroup.MarginLayoutParams"
            if (r6 == 0) goto L_0x026b
            android.view.ViewGroup$MarginLayoutParams r6 = (android.view.ViewGroup.MarginLayoutParams) r6
            int r1 = r6.topMargin
            int r0 = X.3G1.LIZLLL()
            int r1 = r1 + r0
            r6.topMargin = r1
            android.view.ViewGroup r1 = r10.LJJIFFI()
            X.9u5 r0 = r7.LIZIZ
            if (r0 != 0) goto L_0x0132
            kotlin.h.b.n.LIZ(r2)
        L_0x0132:
            r1.addView(r0, r6)
            java.lang.ref.WeakReference r1 = new java.lang.ref.WeakReference
            X.1hK r0 = r10.getActivity()
            r1.<init>(r0)
            r7.LIZLLL = r1
            X.9u5 r0 = r7.LIZIZ
            if (r0 != 0) goto L_0x0147
            kotlin.h.b.n.LIZ(r2)
        L_0x0147:
            X.Eg4 r1 = new X.Eg4
            r1.<init>()
            X.M12.LIZ(r1)
            androidx.recyclerview.widget.RecyclerView r0 = r0.LIZIZ
            if (r0 == 0) goto L_0x0156
            r0.LIZ(r1)
        L_0x0156:
            android.widget.FrameLayout r8 = r10.LJJIIZ
            android.widget.FrameLayout r7 = r10.LJIILIIL
            X.M12.LIZ(r8, r7)
            android.view.ViewGroup$LayoutParams r6 = r8.getLayoutParams()
            if (r6 == 0) goto L_0x0262
            android.view.ViewGroup$MarginLayoutParams r6 = (android.view.ViewGroup.MarginLayoutParams) r6
            X.Eg3 r0 = X.C4379Eg3.LJIIIIZZ
            boolean r0 = r0.LJFF()
            if (r0 == 0) goto L_0x01f6
            r0 = 4640537203540230144(0x4066800000000000, double:180.0)
            int r1 = X.2ha.LIZ(r0)
            int r0 = X.3G1.LIZLLL()
            int r1 = r1 + r0
            r6.height = r1
        L_0x017d:
            r8.setLayoutParams(r6)
            android.view.ViewGroup$LayoutParams r6 = r7.getLayoutParams()
            if (r6 == 0) goto L_0x0259
            android.view.ViewGroup$MarginLayoutParams r6 = (android.view.ViewGroup.MarginLayoutParams) r6
            int r3 = r6.topMargin
            r0 = 4633359591634108416(0x404d000000000000, double:58.0)
            int r1 = X.2ha.LIZ(r0)
            int r0 = X.3G1.LIZLLL()
            int r1 = r1 + r0
            int r3 = r3 + r1
            r6.topMargin = r3
            r7.setLayoutParams(r6)
            X.2bX r1 = r10.LJJIIJZLJL
            X.Ecx r0 = new X.Ecx
            r0.<init>(r10)
            r1.setScrollPredicate(r0)
            X.2bX r1 = r10.LJJIIJZLJL
            X.EjB r0 = new X.EjB
            r0.<init>(r10)
            r1.setCallBack(r0)
            X.Efy r1 = r10.LJIILJJIL
            if (r1 == 0) goto L_0x01b8
            java.lang.String r0 = "homepage_hot"
            r1.LIZ((java.lang.String) r0)
        L_0x01b8:
            com.ss.android.ugc.aweme.IAccountUserService r0 = X.46i.LJFF()
            boolean r0 = r0.isLogin()
            if (r0 != 0) goto L_0x01c5
        L_0x01c2:
            r10.LJ(r4)
        L_0x01c5:
            X.EjS r0 = r10.LJIJ
            if (r0 != 0) goto L_0x01db
            boolean r0 = X.8ZQ.LIZ()
            if (r0 == 0) goto L_0x01db
            X.1hK r1 = r10.getActivity()
            android.view.View r0 = r10.LIZIZ
            X.EjS r0 = X.C4580EjI.LIZ(r1, r0)
            r10.LJIJ = r0
        L_0x01db:
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r4)
            X.8RI.LJ(r0)
            org.greenrobot.eventbus.EventBus r0 = org.greenrobot.eventbus.EventBus.LIZ()
            org.greenrobot.eventbus.EventBus.LIZ(r0, r10)
            X.M12.LIZ(r10)
            X.1hK r1 = r10.getActivity()
            if (r1 != 0) goto L_0x021c
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r9)
            return
        L_0x01f6:
            r0 = 4640290912935608320(0x4065a00000000000, double:173.0)
            int r1 = X.2ha.LIZ(r0)
            int r0 = X.3G1.LIZLLL()
            int r1 = r1 + r0
            r6.height = r1
            goto L_0x017d
        L_0x0208:
            com.ss.android.ugc.aweme.feed.panel.FollowFeedFragmentPanelMT r0 = r10.LJIIZILJ
            r0.LJFF()
            goto L_0x00d3
        L_0x020f:
            java.lang.String r0 = r1.LJIJI()
            r1 = r3
            r3 = r0
            r2 = r1
            goto L_0x00c4
        L_0x0218:
            r2 = r3
            r1 = r2
            goto L_0x00c4
        L_0x021c:
            kotlin.h.b.n.LIZIZ(r1, r2)
            r2 = r10
            X.EMs r0 = X.SzB.LIZ(r2)
            com.ss.android.ugc.aweme.base.MainBusinessAbility r0 = X.C4574EjC.LIZ(r0)
            if (r0 == 0) goto L_0x0255
            boolean r0 = r0.LIZ(r1)
            if (r0 == 0) goto L_0x0255
            X.EMs r3 = X.SzB.LIZ(r2)
            com.ss.android.ugc.aweme.follow.controller.FollowTabScrollProfileStrategy r2 = new com.ss.android.ugc.aweme.follow.controller.FollowTabScrollProfileStrategy
            r2.<init>(r1)
            java.lang.Class<com.bytedance.tiktok.homepage.mainfragment.InterceptHomeViewPagerProtocol> r1 = com.bytedance.tiktok.homepage.mainfragment.InterceptHomeViewPagerProtocol.class
            com.bytedance.tiktok.homepage.mainfragment.InterceptHomeViewPagerProtocol[] r0 = new com.bytedance.tiktok.homepage.mainfragment.InterceptHomeViewPagerProtocol[r4]
            r0[r5] = r2
            java.util.List r0 = X.LeS.LIZJ(r0)
            X.C4559Eix.LIZ((X.C3658EMs) r3, r1, r0)
            r0 = r10
            X.0CD r1 = r0.getLifecycle()
            if (r1 == 0) goto L_0x0255
            com.ss.android.ugc.aweme.utils.HomeViewPagerInterceptHelperKt$registerInterceptHomeViewPager$$inlined$registerProtocol$1 r0 = new com.ss.android.ugc.aweme.utils.HomeViewPagerInterceptHelperKt$registerInterceptHomeViewPager$$inlined$registerProtocol$1
            r0.<init>(r3, r2)
            r1.LIZ(r0)
        L_0x0255:
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r9)
            return
        L_0x0259:
            java.lang.NullPointerException r0 = new java.lang.NullPointerException
            r0.<init>(r3)
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r9)
            throw r0
        L_0x0262:
            java.lang.NullPointerException r0 = new java.lang.NullPointerException
            r0.<init>(r3)
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r9)
            throw r0
        L_0x026b:
            java.lang.NullPointerException r0 = new java.lang.NullPointerException
            r0.<init>(r3)
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r9)
            throw r0
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.feed.ui.FeedFollowFragment.onViewCreated(android.view.View, android.os.Bundle):void");
    }

    public void onActivityResult(int i, int i2, Intent intent) {
        FeedFollowFragment.super.onActivityResult(i, i2, intent);
        if (i == 1) {
            this.LJIIL.LIZLLL();
        }
    }

    public final void LIZ(View view, boolean z, boolean z2) {
        if (this.LJIILJJIL != null && aq_() && view != null) {
            if (z) {
                this.LJIILJJIL.LIZ(view, z2);
            } else {
                this.LJIILJJIL.LIZIZ(view, z2);
            }
        }
    }

    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        2or.LIZ("homepage_follow");
        return 0HB.LIZ((Activity) getContext(), 2131559711);
    }
}
