package com.tencent.mm.plugin.story.f;

import a.f.a.r;
import a.f.b.j;
import a.f.b.k;
import a.l;
import a.y;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ab.b;
import com.tencent.mm.plugin.story.f.j.a;
import com.tencent.mm.plugin.story.model.d.g;
import com.tencent.mm.sdk.platformtools.bo;

@l(dWo = {1, 1, 13}, dWp = {"\u0000\u001c\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\u0007H\n¢\u0006\u0002\b\t"}, dWq = {"<anonymous>", "", "storyId", "", "isUnread", "", "fromUser", "", "storyOwner", "invoke"})
final class j$g extends k implements r<Long, Boolean, String, String, y> {
    final /* synthetic */ j rZW;

    j$g(j jVar) {
        this.rZW = jVar;
        super(4);
    }

    public final /* synthetic */ Object a(Object obj, Object obj2, Object obj3, Object obj4) {
        int i;
        AppMethodBeat.i(138814);
        long longValue = ((Number) obj).longValue();
        boolean booleanValue = ((Boolean) obj2).booleanValue();
        String str = (String) obj4;
        j.p((String) obj3, "fromUser");
        j.p(str, "storyOwner");
        if (booleanValue) {
            a aVar = j.rZV;
            j.czH();
        }
        int i2 = 0;
        for (g gVar : j.a(this.rZW)) {
            if ((gVar.rWa.rUJ == longValue ? 1 : null) != null) {
                i = i2;
                break;
            }
            i2++;
        }
        i = -1;
        int size = j.a(this.rZW).size();
        if (i >= 0 && size > i) {
            com.tencent.mm.plugin.story.model.j.a aVar2 = com.tencent.mm.plugin.story.model.j.rST;
            if (bo.isEqual(str, com.tencent.mm.plugin.story.model.j.a.cnk())) {
                j.o(j.a(this.rZW).get(i), "galleryItems[index]");
                aVar2 = com.tencent.mm.plugin.story.model.j.rST;
                com.tencent.mm.plugin.story.h.j lx = com.tencent.mm.plugin.story.model.j.a.cxT().lx(longValue);
                if (lx != null) {
                    g.a aVar3 = g.rWe;
                    b.a((a.f.a.a) new 1(this, booleanValue, lx, g.a.c(lx), i));
                }
            }
        }
        y yVar = y.AUy;
        AppMethodBeat.o(138814);
        return yVar;
    }
}
