package com.tencent.mm.plugin.fav.ui;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.fav.a.ae;
import com.tencent.mm.plugin.fav.a.b;
import com.tencent.mm.plugin.fav.a.g;
import com.tencent.mm.plugin.fav.ui.b.a;
import com.tencent.mm.sdk.platformtools.ab;

class b$a$1 implements Runnable {
    final /* synthetic */ boolean mhm;
    final /* synthetic */ a mhn;

    b$a$1(a aVar, boolean z) {
        this.mhn = aVar;
        this.mhm = z;
    }

    public final void run() {
        AppMethodBeat.i(73917);
        if (this.mhm) {
            ab.i("MicroMsg.Fav.FavAddService", "has data, check cdn now, type %d", new Object[]{Integer.valueOf(this.mhn.mgf.field_type)});
            this.mhn.mgf.field_itemStatus = 1;
            this.mhn.mgf.field_xml = g.s(this.mhn.mgf);
            if (b.k(this.mhn.mgf)) {
                ((ae) com.tencent.mm.kernel.g.M(ae.class)).getFavItemInfoStorage().a(this.mhn.mgf, new String[0]);
            } else {
                ((ae) com.tencent.mm.kernel.g.M(ae.class)).getFavItemInfoStorage().y(this.mhn.mgf);
            }
            ((ae) com.tencent.mm.kernel.g.M(ae.class)).getCheckCdnService().run();
            AppMethodBeat.o(73917);
            return;
        }
        ab.i("MicroMsg.Fav.FavAddService", "no data, send item now, type %d", new Object[]{Integer.valueOf(this.mhn.mgf.field_type)});
        this.mhn.mgf.field_itemStatus = 9;
        this.mhn.mgf.field_xml = g.s(this.mhn.mgf);
        if (b.k(this.mhn.mgf)) {
            ((ae) com.tencent.mm.kernel.g.M(ae.class)).getFavItemInfoStorage().a(this.mhn.mgf, new String[0]);
        } else {
            ((ae) com.tencent.mm.kernel.g.M(ae.class)).getFavItemInfoStorage().y(this.mhn.mgf);
        }
        ((ae) com.tencent.mm.kernel.g.M(ae.class)).getSendService().run();
        AppMethodBeat.o(73917);
    }
}
