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

import a.f.a.b;
import a.f.b.j;
import a.l;
import a.y;
import android.support.v7.widget.RecyclerView.a;
import android.support.v7.widget.RecyclerView.n;
import android.support.v7.widget.RecyclerView.v;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.story.model.d.g;
import com.tencent.mm.plugin.story.ui.a.i;
import java.util.ArrayList;
import java.util.List;

@l(dWo = {1, 1, 13}, dWp = {"\u0000N\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010 \n\u0002\b\u0004\u0018\u0000 $2\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0001$B\u0005¢\u0006\u0002\u0010\u0003J\b\u0010\u0017\u001a\u00020\u0006H\u0016J\u0018\u0010\u0018\u001a\u00020\n2\u0006\u0010\u0019\u001a\u00020\u00022\u0006\u0010\t\u001a\u00020\u0006H\u0016J\u0018\u0010\u001a\u001a\u00020\u00022\u0006\u0010\u001b\u001a\u00020\u001c2\u0006\u0010\u001d\u001a\u00020\u0006H\u0016J\u0010\u0010\u001e\u001a\u00020\n2\u0006\u0010\u0019\u001a\u00020\u0002H\u0016J$\u0010\u001f\u001a\u00020\n2\u001c\u0010 \u001a\u0018\u0012\u0014\u0012\u0012\u0012\u0004\u0012\u00020\u00110\u0010j\b\u0012\u0004\u0012\u00020\u0011`\u00120!J\u0016\u0010\"\u001a\u00020\n2\u0006\u0010#\u001a\u00020\u00062\u0006\u0010\t\u001a\u00020\u0006R7\u0010\u0004\u001a\u001f\u0012\u0013\u0012\u00110\u0006¢\u0006\f\b\u0007\u0012\b\b\b\u0012\u0004\b\b(\t\u0012\u0004\u0012\u00020\n\u0018\u00010\u0005X\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u000b\u0010\f\"\u0004\b\r\u0010\u000eR>\u0010\u000f\u001a2\u0012\u0014\u0012\u0012\u0012\u0004\u0012\u00020\u00110\u0010j\b\u0012\u0004\u0012\u00020\u0011`\u00120\u0010j\u0018\u0012\u0014\u0012\u0012\u0012\u0004\u0012\u00020\u00110\u0010j\b\u0012\u0004\u0012\u00020\u0011`\u0012`\u0012X\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0013\u001a\u00020\u0014X\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0015\u001a\u00020\u0006X\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0016\u001a\u00020\u0006X\u000e¢\u0006\u0002\n\u0000¨\u0006%"}, dWq = {"Lcom/tencent/mm/plugin/story/ui/view/gallery/VerticalAdapter;", "Landroid/support/v7/widget/RecyclerView$Adapter;", "Lcom/tencent/mm/plugin/story/ui/view/gallery/VerticalViewHolder;", "()V", "bindCallback", "Lkotlin/Function1;", "", "Lkotlin/ParameterName;", "name", "position", "", "getBindCallback", "()Lkotlin/jvm/functions/Function1;", "setBindCallback", "(Lkotlin/jvm/functions/Function1;)V", "galleryItems", "Ljava/util/ArrayList;", "Lcom/tencent/mm/plugin/story/model/gallery/StoryGalleryItem;", "Lkotlin/collections/ArrayList;", "pool", "Landroid/support/v7/widget/RecyclerView$RecycledViewPool;", "prePosition", "preRow", "getItemCount", "onBindViewHolder", "holder", "onCreateViewHolder", "parent", "Landroid/view/ViewGroup;", "viewType", "onViewAttachedToWindow", "update", "items", "", "updateChildRecyclerPosition", "row", "Companion", "plugin-story_release"})
public final class r extends a<s> {
    private static final String TAG = TAG;
    public static final a srA = new a((byte) 0);
    private final ArrayList<ArrayList<g>> rZR = new ArrayList();
    b<? super Integer, y> srw;
    int srx = -1;
    int sry;
    private final n srz = new n();

    public r() {
        AppMethodBeat.i(111011);
        this.srz.aF(0, 2);
        AppMethodBeat.o(111011);
    }

    public final /* synthetic */ void k(v vVar) {
        AppMethodBeat.i(111010);
        s sVar = (s) vVar;
        j.p(sVar, "holder");
        super.k((v) sVar);
        if (sVar.iJP.getChildCount() > 0) {
            v aZ = sVar.iJP.aZ(sVar.iJP.getChildAt(0));
            if (aZ instanceof i) {
                ((i) aZ).cCi();
            }
        }
        AppMethodBeat.o(111010);
    }

    static {
        AppMethodBeat.i(111012);
        AppMethodBeat.o(111012);
    }

    public final void dI(List<? extends ArrayList<g>> list) {
        AppMethodBeat.i(111006);
        j.p(list, "items");
        this.rZR.clear();
        this.rZR.addAll(list);
        AppMethodBeat.o(111006);
    }

    public final int getItemCount() {
        AppMethodBeat.i(111008);
        int size = this.rZR.size();
        AppMethodBeat.o(111008);
        return size;
    }
}
