package com.tencent.mm.plugin.f;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.f.b.2;
import com.tencent.mm.plugin.f.c.a;
import com.tencent.mm.plugin.messenger.foundation.a.a.h.c;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.storage.bi;
import java.util.Iterator;

class b$2$1 implements Runnable {
    final /* synthetic */ c jZZ;
    final /* synthetic */ 2 kaa;

    b$2$1(2 2, c cVar) {
        this.kaa = 2;
        this.jZZ = cVar;
    }

    public final void run() {
        AppMethodBeat.i(18574);
        ab.d("MicroMsg.CalcWxService", "on notify change [%s] [%d]", new Object[]{this.jZZ.oqJ, Integer.valueOf(this.jZZ.oqK.size())});
        if ("delete".equals(this.jZZ.oqJ)) {
            AppMethodBeat.o(18574);
            return;
        }
        int i = "delete".equals(this.jZZ.oqJ) ? 2 : 1;
        Iterator it = this.jZZ.oqK.iterator();
        while (it.hasNext()) {
            bi biVar = (bi) it.next();
            if (biVar != null) {
                boolean contains;
                b bVar = this.kaa.jZY;
                long j = biVar.field_msgId;
                if (bVar.jZK) {
                    contains = bVar.jZJ.contains(Long.valueOf(j));
                } else {
                    contains = false;
                }
                if (contains) {
                    ab.d("MicroMsg.CalcWxService", "it locked now [%d]", new Object[]{Long.valueOf(biVar.field_msgId)});
                } else {
                    b.d(this.kaa.jZY).aa(new a(biVar, i));
                }
            }
        }
        AppMethodBeat.o(18574);
    }
}
