package com.ss.android.ugc.aweme.inbox;

import X.2Pr;
import X.C2735Dud;
import X.Ls2;
import X.M12;
import android.util.SparseArray;
import android.view.View;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.base.fragment.AmeBaseFragment;

public class BaseInboxFragment extends AmeBaseFragment {
    public View LIZ;
    public boolean LIZIZ;
    public SparseArray LIZJ;

    static {
        Covode.recordClassIndex(87753);
    }

    public View LIZ(int i) {
        if (this.LIZJ == null) {
            this.LIZJ = new SparseArray();
        }
        View view = (View) this.LIZJ.get(i);
        if (view != null) {
            return view;
        }
        View view2 = getView();
        if (view2 == null) {
            return null;
        }
        View findViewById = view2.findViewById(i);
        this.LIZJ.put(i, findViewById);
        return findViewById;
    }

    public void LJ() {
        SparseArray sparseArray = this.LIZJ;
        if (sparseArray != null) {
            sparseArray.clear();
        }
    }

    public /* synthetic */ void onDestroyView() {
        BaseInboxFragment.super.onDestroyView();
        LJ();
    }

    public final void LIZ(Ls2<2Pr> ls2) {
        M12.LIZ(ls2);
        if (!C2735Dud.LIZ.LIZ()) {
            ls2.invoke();
        } else if (!this.LIZIZ) {
            this.LIZIZ = true;
            ls2.invoke();
        }
    }
}
