package com.tencent.mm.plugin.story.ui.view.gallery;

import a.f.b.j;
import a.l;
import a.v;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewGroup.MarginLayoutParams;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.kernel.e;
import com.tencent.mm.plugin.story.api.m;
import com.tencent.mm.plugin.story.ui.view.gallery.l.g;
import com.tencent.mm.storage.ac.a;
import com.tencent.mm.ui.ak;

@l(dWo = {1, 1, 13}, dWp = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, dWq = {"<anonymous>", "", "run"})
final class l$g$e implements Runnable {
    final /* synthetic */ g spO;

    l$g$e(g gVar) {
        this.spO = gVar;
    }

    public final void run() {
        AppMethodBeat.i(110795);
        l lVar = this.spO.spK;
        a aVar = null;
        if (lVar.soE == m.a.rQF) {
            aVar = a.xWF;
        }
        if (aVar != null) {
            e RP = com.tencent.mm.kernel.g.RP();
            j.o(RP, "storage()");
            if (!RP.Ry().getBoolean(aVar, false)) {
                LayoutParams layoutParams = lVar.spg.getLayoutParams();
                if (layoutParams == null) {
                    v vVar = new v("null cannot be cast to non-null type android.view.ViewGroup.MarginLayoutParams");
                    AppMethodBeat.o(110795);
                    throw vVar;
                }
                MarginLayoutParams marginLayoutParams = (MarginLayoutParams) layoutParams;
                ak.hF(lVar.getContext());
                marginLayoutParams.topMargin = -lVar.getTop();
                lVar.spg.setLayoutParams(marginLayoutParams);
                lVar.spg.setVisibility(0);
                TextView textView = lVar.spg;
                String string = lVar.getResources().getString(2131303956);
                j.o(string, "resources.getString(R.string.story_pull_hint)");
                textView.setText(l.a.l(string, lVar.spg.getCurrentTextColor()));
            }
        }
        AppMethodBeat.o(110795);
    }
}
