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

import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.aw.a;
import com.tencent.mm.compatible.util.f;
import com.tencent.mm.plugin.fav.a.b;
import com.tencent.mm.plugin.fav.a.g;
import com.tencent.mm.protocal.protobuf.aar;
import com.tencent.mm.protocal.protobuf.abl;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.ui.base.t;
import com.tencent.mm.vfs.j;
import com.tencent.ytcommon.BuildConfig;

class g$1 implements OnClickListener {
    final /* synthetic */ g moQ;

    g$1(g gVar) {
        this.moQ = gVar;
    }

    public final void onClick(View view) {
        AppMethodBeat.i(74628);
        if (f.Mn()) {
            if (view.getTag() instanceof g) {
                g gVar = (g) view.getTag();
                abl abl = gVar.field_favProto.wit;
                aar c = b.c(gVar);
                if (c == null) {
                    ab.w("MicroMsg.FavBaseListItem", "data item is null");
                    AppMethodBeat.o(74628);
                    return;
                } else if (b.e(c)) {
                    ab.i("MicroMsg.FavBaseListItem", "same song, do release");
                    a.aic();
                    g.a(this.moQ, null);
                    AppMethodBeat.o(74628);
                    return;
                } else {
                    String w;
                    com.tencent.mm.vfs.b bVar = new com.tencent.mm.vfs.b(b.c(c));
                    if (bVar.exists()) {
                        w = j.w(bVar.dMD());
                    } else if (c.cvq == null) {
                        w = BuildConfig.FLAVOR;
                    } else {
                        String w2;
                        bVar = new com.tencent.mm.vfs.b(b.bue() + com.tencent.mm.a.g.x(c.cvq.getBytes()));
                        if (bVar.exists()) {
                            w2 = j.w(bVar.dMD());
                        } else {
                            w2 = BuildConfig.FLAVOR;
                        }
                        w = w2;
                    }
                    a.b(com.tencent.mm.aw.f.a(6, null, c.title, c.desc, c.wgg, c.wgk, c.wgi, c.mnd, b.bul(), w, BuildConfig.FLAVOR, abl.appId));
                    g.a(this.moQ, (ImageView) view);
                }
            }
            AppMethodBeat.o(74628);
            return;
        }
        t.hO(this.moQ.mhy.context);
        AppMethodBeat.o(74628);
    }
}
