得物.apk(点击下载) / LiveNoticeHelper$checkLiveNoticeNPS$1.java


package com.shizhuang.duapp.modules.live.audience.notice.helper;

import a.f;
import android.view.View;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.OnLifecycleEvent;
import cd.n;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.shizhuang.duapp.libs.dulogger.Printer;
import com.shizhuang.duapp.modules.live.audience.notice.model.LiveNPSNoticeModel;
import com.shizhuang.duapp.modules.router.ServiceManager;
import java.util.HashMap;
import kotlin.Metadata;
import kotlin.text.StringsKt__StringsJVMKt;
import mn0.e;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import rd.l;
import td.s;

@Metadata(bv = {}, d1 = {"\u0000\u0014\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\b\n\u0018\u00002\u00020\u0001J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0007¨\u0006\u0006"}, d2 = {"com/shizhuang/duapp/modules/live/audience/notice/helper/LiveNoticeHelper$checkLiveNoticeNPS$1", "Landroidx/lifecycle/LifecycleObserver;", "Landroidx/lifecycle/LifecycleOwner;", "lifecycleOwner", "", "onDestory", "du_live_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: LiveNoticeHelper.kt */
public final class LiveNoticeHelper$checkLiveNoticeNPS$1 implements LifecycleObserver {
    public static ChangeQuickRedirect changeQuickRedirect;
    public final /* synthetic */ int b;

    /* renamed from: c  reason: collision with root package name */
    public final /* synthetic */ String f18099c;

    /* compiled from: LiveNoticeHelper.kt */
    public static final class a extends s<LiveNPSNoticeModel> {
        public static ChangeQuickRedirect changeQuickRedirect;

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a
        public void onBzError(@Nullable l<LiveNPSNoticeModel> lVar) {
            if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 190215, new Class[]{l.class}, Void.TYPE).isSupported) {
                super.onBzError(lVar);
                Printer u4 = fo.a.u("LiveNoticeHelper");
                StringBuilder h12 = f.h("checkLiveNoticeNPS ");
                h12.append(lVar != null ? lVar.c() : null);
                u4.i(h12.toString(), new Object[0]);
            }
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
        public void onSuccess(Object obj) {
            LiveNPSNoticeModel liveNPSNoticeModel = (LiveNPSNoticeModel) obj;
            boolean z = true;
            if (!PatchProxy.proxy(new Object[]{liveNPSNoticeModel}, this, changeQuickRedirect, false, 190214, new Class[]{LiveNPSNoticeModel.class}, Void.TYPE).isSupported) {
                super.onSuccess(liveNPSNoticeModel);
                if (liveNPSNoticeModel != null) {
                    String jumpTo = liveNPSNoticeModel.getJumpTo();
                    if (jumpTo != null && !StringsKt__StringsJVMKt.isBlank(jumpTo)) {
                        z = false;
                    }
                    if (!z) {
                        StringBuilder h12 = f.h("https://m.dewu.com/router/web/BrowserPage?loadUrl=");
                        h12.append(liveNPSNoticeModel.getJumpTo());
                        ServiceManager.x().showPrivacyLetterWithParams(liveNPSNoticeModel.getCover(), liveNPSNoticeModel.getTitle(), liveNPSNoticeModel.getCopy(), "", h12.toString(), false, (View.OnClickListener) new LiveNoticeHelper$checkLiveNoticeNPS$1$onDestory$1$onSuccess$$inlined$let$lambda$1(liveNPSNoticeModel));
                    }
                }
            }
        }
    }

    public LiveNoticeHelper$checkLiveNoticeNPS$1(int i, String str) {
        this.b = i;
        this.f18099c = str;
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
    public final void onDestory(@NotNull LifecycleOwner lifecycleOwner) {
        if (!PatchProxy.proxy(new Object[]{lifecycleOwner}, this, changeQuickRedirect, false, 190213, new Class[]{LifecycleOwner.class}, Void.TYPE).isSupported) {
            HashMap hashMap = new HashMap();
            try {
                hashMap.put("streamLogId", Integer.valueOf(this.b));
                hashMap.put("kolUserId", Long.valueOf(n.e(this.f18099c, 0)));
            } catch (NumberFormatException e) {
                Printer u4 = fo.a.u("LiveNoticeHelper");
                StringBuilder h12 = f.h("checkLiveNoticeNPS NumberFormatException: ");
                h12.append(e.getMessage());
                u4.i(h12.toString(), new Object[0]);
                e.printStackTrace();
            }
            e.f35721a.q(hashMap, new a());
        }
    }
}