package com.ss.android.ugc.aweme.choosemusic.fragment;

import X.33g;
import X.3BB;
import X.C5459OWg;
import X.M12;
import X.OVS;
import X.OW5;
import com.bytedance.covode.number.Covode;
import java.util.HashMap;
import java.util.List;
import kotlin.h.b.n;

public final class DiscoverMusicFragment extends BaseDiscoverMusicFragment {
    public static final OW5 LJIILL = new OW5((byte) 0);
    public HashMap LJIIZILJ;

    static {
        Covode.recordClassIndex(56128);
    }

    public final void LIZIZ() {
        C5459OWg oWg = this.LJ;
        n.LIZIZ(oWg, "");
        oWg.setShowFooter(false);
    }

    public final /* synthetic */ void onDestroyView() {
        DiscoverMusicFragment.super.onDestroyView();
        HashMap hashMap = this.LJIIZILJ;
        if (hashMap != null) {
            hashMap.clear();
        }
    }

    public final void LIZJ() {
        Boolean bool = (Boolean) this.LIZJ.LIZIZ("data_sticker_music_from_video", true);
        List list = (List) this.LIZJ.LIZIZ("data_sticker", (Object) null);
        n.LIZIZ(bool, "");
        if (bool.booleanValue()) {
            if (this.LIZJ.LIZ("data_challenge") != null) {
                this.LJ.LIZLLL(5);
            } else if (list != null && list.size() > 0) {
                this.LJ.LIZLLL(4);
            }
        } else if (list != null && list.size() > 0) {
            this.LJ.LIZLLL(4);
        } else if (this.LIZJ.LIZ("data_challenge") != null) {
            this.LJ.LIZLLL(5);
        }
    }

    public final void LIZ(33g r5) {
        int i;
        M12.LIZ(r5);
        Object LIZ = r5.LIZ();
        n.LIZIZ(LIZ, "");
        OVS ovs = (OVS) LIZ;
        if (getUserVisibleHint() && ovs.LIZJ != -1) {
            if (!(ovs.LIZLLL == 1 && ovs.LIZ == 0) && ovs.LIZ == 1) {
                3BB r1 = new 3BB(getActivity());
                if (ovs.LIZLLL == 1) {
                    i = 2131822729;
                } else {
                    i = 2131822319;
                }
                r1.LIZIZ(i);
                r1.LIZIZ();
            }
        }
    }
}
