WeChat.apk(点击下载) / r.java


package com.tencent.mm.plugin.finder.view;

import android.content.Context;
import android.content.Intent;
import android.view.MenuItem;
import bw3.cm0;
import bw3.jn1;
import bw3.ul0;
import com.tencent.mm.R;
import com.tencent.mm.autogen.events.FinderCommentReportEvent;
import com.tencent.mm.plugin.finder.service.t1;
import com.tencent.mm.plugin.finder.storage.FinderItem;
import com.tencent.mm.sdk.platformtools.ClipboardHelper;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.sdk.platformtools.MMApplicationContext;
import com.tencent.mm.sdk.platformtools.Util;
import ez1.f1;
import i14.p0;
import i14.y0;
import java.util.Arrays;
import kh4.l;
import lh4.m;
import m60.d;
import p64.n;
import pu1.z;
import sv3.b;
import t32.k6;
import wg4.b0;
import yz3.j;
import zz1.h4;

public final class r implements p0 {

    /* renamed from: d  reason: collision with root package name */
    public final Context f121382d;

    /* renamed from: e  reason: collision with root package name */
    public final FinderItem f121383e;

    /* renamed from: f  reason: collision with root package name */
    public z f121384f;

    /* renamed from: g  reason: collision with root package name */
    public int f121385g;

    /* renamed from: h  reason: collision with root package name */
    public l<? super z, b0> f121386h;

    public static final class a implements k6<jn1> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ r f121387d;

        public a(r rVar) {
            this.f121387d = rVar;
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, bw3.ul0] */
        @Override // t32.k6
        public void D6(jn1 jn12, ul0 ul02) {
            m.g(jn12, "req");
            m.g(ul02, "ret");
            Context context = MMApplicationContext.getContext();
            if (ul02.f38816e == 0) {
                this.f121387d.f121384f.f285769d.s2().blacklist_flag = 0;
                Log.i("Finder.MenuItemCreateListener", "comment black list succ");
                y0.makeText(context, context.getResources().getString(R.string.f1s), 0).show();
                return;
            }
            this.f121387d.f121384f.f285769d.s2().blacklist_flag = 1;
            Log.i("Finder.MenuItemCreateListener", "comment black list failed:" + ul02.f38816e);
            y0.makeText(context, context.getResources().getString(R.string.f1t), 0).show();
        }
    }

    public r(Context context, FinderItem finderItem, z zVar, int i15, l<? super z, b0> lVar) {
        m.g(context, "context");
        m.g(finderItem, "feedObject");
        m.g(zVar, "commentItem");
        this.f121382d = context;
        this.f121383e = finderItem;
        this.f121384f = zVar;
        this.f121385g = i15;
        this.f121386h = lVar;
    }

    @Override // i14.p0
    public void onMMMenuItemSelected(MenuItem menuItem, int i15) {
        h4 h4Var;
        long j15;
        if (menuItem != null) {
            int itemId = menuItem.getItemId();
            if (itemId == 0) {
                if (!Util.isNullOrNil(this.f121384f.f285769d.getContent())) {
                    ClipboardHelper.setText(this.f121384f.f285769d.getContent());
                    ak.a.makeText(MMApplicationContext.getContext(), (int) R.string.f367407st, 0).show();
                    long r25 = this.f121384f.f285769d.r2();
                    FinderCommentReportEvent finderCommentReportEvent = new FinderCommentReportEvent();
                    FinderCommentReportEvent.a aVar = finderCommentReportEvent.f62803d;
                    aVar.f62804a = 5;
                    aVar.f62805b = r25;
                    finderCommentReportEvent.publish();
                }
            } else if (itemId == 1) {
                l<? super z, b0> lVar = this.f121386h;
                if (lVar != null) {
                    lVar.invoke(this.f121384f);
                }
                long r26 = this.f121384f.f285769d.r2();
                FinderCommentReportEvent finderCommentReportEvent2 = new FinderCommentReportEvent();
                FinderCommentReportEvent.a aVar2 = finderCommentReportEvent2.f62803d;
                aVar2.f62804a = 4;
                aVar2.f62805b = r26;
                finderCommentReportEvent2.publish();
            } else {
                String str = null;
                if (itemId == 2) {
                    if (this.f121383e.isQAFeed()) {
                        cn1.a aVar3 = cn1.a.f50706a;
                        Context context = this.f121382d;
                        h4 h4Var2 = this.f121384f.f285769d;
                        aVar3.d(context, h4Var2.field_feedId, h4Var2.r2(), 92);
                    } else if (!this.f121384f.f285769d.G2()) {
                        cn1.a aVar4 = cn1.a.f50706a;
                        Context context2 = this.f121382d;
                        h4 h4Var3 = this.f121384f.f285769d;
                        aVar4.a(context2, h4Var3.field_feedId, h4Var3.r2(), this.f121385g);
                    } else {
                        Context context3 = this.f121382d;
                        cm0 cm02 = this.f121384f.f285769d.s2().advertisement_info;
                        if (cm02 != null) {
                            j15 = cm02.f18471e;
                        } else {
                            j15 = 0;
                        }
                        m.g(context3, "context");
                        String format = String.format("https://mp.weixin.qq.com/promotion/res/htmledition/mobile/html/feedback.html?aid=%s&source=1022", Arrays.copyOf(new Object[]{d.p(j15)}, 1));
                        m.f(format, "format(format, *args)");
                        Intent intent = new Intent();
                        intent.putExtra("rawUrl", format);
                        b.j(context3, "webview", ".ui.tools.WebViewUI", intent, null);
                    }
                    long r27 = this.f121384f.f285769d.r2();
                    FinderCommentReportEvent finderCommentReportEvent3 = new FinderCommentReportEvent();
                    FinderCommentReportEvent.a aVar5 = finderCommentReportEvent3.f62803d;
                    aVar5.f62804a = 6;
                    aVar5.f62805b = r27;
                    finderCommentReportEvent3.publish();
                } else if (itemId == 3) {
                    yz3.d c15 = j.c(f1.class);
                    m.f(c15, "getService(FinderReportLogic::class.java)");
                    Context context4 = MMApplicationContext.getContext();
                    m.f(context4, "getContext()");
                    f1.EO0((f1) c15, context4, 11, 4, false, 0, 0, null, 120, null);
                    Context context5 = this.f121382d;
                    n nVar = new n(context5, 1, true);
                    nVar.m(context5.getString(R.string.ckh), 17, gy3.a.b(context5, 14));
                    nVar.f281245i = new s(context5);
                    nVar.f281259q = new t(this);
                    nVar.q();
                } else if (itemId == 4) {
                    yz3.d c16 = j.c(f1.class);
                    m.f(c16, "getService(FinderReportLogic::class.java)");
                    Context context6 = MMApplicationContext.getContext();
                    m.f(context6, "getContext()");
                    f1.EO0((f1) c16, context6, 11, 111, false, 0, 0, null, 120, null);
                    t1 t1Var = (t1) j.c(t1.class);
                    long itemId2 = this.f121384f.getItemId();
                    h4 h4Var4 = this.f121384f.f285769d;
                    long j16 = h4Var4.field_feedId;
                    String str2 = h4Var4.field_objectNonceId;
                    if (str2 == null) {
                        str2 = "";
                    }
                    t1Var.yX(itemId2, j16, str2, false, new a(this));
                } else if (itemId == 999) {
                    z zVar = this.f121384f;
                    if (!(zVar == null || (h4Var = zVar.f285769d) == null)) {
                        str = h4Var.toString();
                    }
                    ClipboardHelper.setText(str);
                }
            }
        }
    }
}