小红书.apk(点击下载) / AlphaLiveMomentsActivity.java


package com.xingin.alpha.moment;

import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.TypedValue;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import bj2.l;
import com.drakeet.multitype.MultiTypeAdapter;
import com.tencent.mars.extracommon.NetStatusUtil;
import com.tencent.smtt.sdk.TbsListener;
import com.xingin.alpha.R$id;
import com.xingin.alpha.R$layout;
import com.xingin.alpha.R$string;
import com.xingin.alpha.bean.UserLatestLivePreviewBean;
import com.xingin.alpha.moment.setting.MomentsSettingActivity;
import com.xingin.alpha.moment.view.AlphaLiveMomentsTrailerView;
import com.xingin.alpha.ui.events.AlphaEventsWebActivity;
import com.xingin.alpha.ui.widget.AlphaTextView;
import com.xingin.android.redutils.base.BaseActivity;
import com.xingin.android.xhscomm.router.page.Page;
import com.xingin.ui.textview.XYTextView;
import com.xingin.widgets.XYImageView;
import com.xingin.xhs.xydeeplink.xhsdiscover.live_emcee_moments.PageLiveEmceeMoments;
import com.xingin.xhstheme.R$color;
import el.g0;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.Map;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function4;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import qv.n;
import qv.o;
import qv.p;
import rv.j;
import sk2.b0;
import sy.f0;
import sy.q;
import sy.q1;
import sy.u;

@Metadata(bv = {}, d1 = {"\u0000V\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\n\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0007\u0018\u00002\u00020\u00012\u00020\u0002B\u0007¢\u0006\u0004\b,\u0010-J\u0012\u0010\u0006\u001a\u00020\u00052\b\u0010\u0004\u001a\u0004\u0018\u00010\u0003H\u0014J\b\u0010\u0007\u001a\u00020\u0005H\u0016J\u0010\u0010\n\u001a\u00020\u00052\u0006\u0010\t\u001a\u00020\bH\u0016J\u0010\u0010\r\u001a\u00020\u00052\u0006\u0010\f\u001a\u00020\u000bH\u0016J\u0016\u0010\u0011\u001a\u00020\u00052\f\u0010\u0010\u001a\b\u0012\u0004\u0012\u00020\u000f0\u000eH\u0016J\b\u0010\u0012\u001a\u00020\u0005H\u0016J \u0010\u0018\u001a\u00020\u00052\u0006\u0010\u0014\u001a\u00020\u00132\u0006\u0010\u0015\u001a\u00020\u00132\u0006\u0010\u0017\u001a\u00020\u0016H\u0016J\u0010\u0010\u001a\u001a\u00020\u00052\u0006\u0010\u0019\u001a\u00020\u0016H\u0016J\b\u0010\u001b\u001a\u00020\u0005H\u0016J\b\u0010\u001c\u001a\u00020\u0005H\u0016J\b\u0010\u001d\u001a\u00020\u0005H\u0002J\b\u0010\u001e\u001a\u00020\u0005H\u0002J\b\u0010\u001f\u001a\u00020\u0005H\u0002J\b\u0010 \u001a\u00020\u0005H\u0002R\u001b\u0010&\u001a\u00020!8BX‚„\u0002¢\u0006\f\n\u0004\b\"\u0010#\u001a\u0004\b$\u0010%R\u001b\u0010+\u001a\u00020'8BX‚„\u0002¢\u0006\f\n\u0004\b(\u0010#\u001a\u0004\b)\u0010*¨\u0006."}, d2 = {"Lcom/xingin/alpha/moment/AlphaLiveMomentsActivity;", "Lcom/xingin/android/redutils/base/BaseActivity;", "Lqv/b;", "Landroid/os/Bundle;", "savedInstanceState", "", "onCreate", "onResume", "Lrv/b;", "hostInfo", "S2", "Lcom/xingin/alpha/bean/UserLatestLivePreviewBean;", "previewBean", "t4", "Ljava/util/ArrayList;", "Lrv/c;", "list", "S6", "K0", "", "livePosition", "videoPosition", "", "needPublic", "M2", "loading", "D", "close", "J0", "initView", "H7", "G7", "I7", "Lyj2/g;", "a", "Lkotlin/Lazy;", "F7", "()Lyj2/g;", "progressNormalDialog", "Lqv/n;", "b", "E7", "()Lqv/n;", "presenter", "<init>", "()V", "alpha_library_release"}, k = 1, mv = {1, 6, 0})
/* compiled from: AlphaLiveMomentsActivity.kt */
public final class AlphaLiveMomentsActivity extends BaseActivity implements qv.b {

    /* renamed from: a  reason: collision with root package name */
    public final Lazy f44545a = LazyKt__LazyJVMKt.lazy(new g(this));

    /* renamed from: b  reason: collision with root package name */
    public final Lazy f44546b = LazyKt__LazyJVMKt.lazy(f.f44553a);

    /* renamed from: c  reason: collision with root package name */
    public Map<Integer, View> f44547c = new LinkedHashMap();

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: AlphaLiveMomentsActivity.kt */
    public static final class a extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaLiveMomentsActivity f44548a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public a(AlphaLiveMomentsActivity alphaLiveMomentsActivity) {
            super(0);
            this.f44548a = alphaLiveMomentsActivity;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            MomentsSettingActivity.f44599j.a(this.f44548a.E7().e1(), this.f44548a);
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: AlphaLiveMomentsActivity.kt */
    public static final class b extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaLiveMomentsActivity f44549a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public b(AlphaLiveMomentsActivity alphaLiveMomentsActivity) {
            super(0);
            this.f44549a = alphaLiveMomentsActivity;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            AlphaEventsWebActivity.a.c(AlphaEventsWebActivity.f45671n, this.f44549a, u.f131753a.N(), null, false, -1, false, 36, null);
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\u001c\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\b\u001a\u00020\u00072\u0006\u0010\u0001\u001a\u00020\u00002\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u00002\u0006\u0010\u0006\u001a\u00020\u0005H\n¢\u0006\u0004\b\b\u0010\t"}, d2 = {"", "livePosition", "Lrv/d;", "liveBean", "videoPosition", "Lrv/j;", "videoBean", "", "a", "(ILrv/d;ILrv/j;)V"}, k = 3, mv = {1, 6, 0})
    /* compiled from: AlphaLiveMomentsActivity.kt */
    public static final class c extends Lambda implements Function4<Integer, rv.d, Integer, j, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaLiveMomentsActivity f44550a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public c(AlphaLiveMomentsActivity alphaLiveMomentsActivity) {
            super(4);
            this.f44550a = alphaLiveMomentsActivity;
        }

        public final void a(int i10, rv.d dVar, int i14, j jVar) {
            Intrinsics.checkNotNullParameter(dVar, "liveBean");
            Intrinsics.checkNotNullParameter(jVar, "videoBean");
            this.f44550a.E7().u1(i10, i14);
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function4
        public /* bridge */ /* synthetic */ Unit invoke(Integer num, rv.d dVar, Integer num2, j jVar) {
            a(num.intValue(), dVar, num2.intValue(), jVar);
            return Unit.INSTANCE;
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\u0014\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0001\u001a\u00020\u00002\u0006\u0010\u0003\u001a\u00020\u0002H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"", "position", "Lrv/g;", "month", "", "a", "(ILrv/g;)V"}, k = 3, mv = {1, 6, 0})
    /* compiled from: AlphaLiveMomentsActivity.kt */
    public static final class d extends Lambda implements Function2<Integer, rv.g, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaLiveMomentsActivity f44551a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public d(AlphaLiveMomentsActivity alphaLiveMomentsActivity) {
            super(2);
            this.f44551a = alphaLiveMomentsActivity;
        }

        public final void a(int i10, rv.g gVar) {
            Intrinsics.checkNotNullParameter(gVar, "month");
            this.f44551a.E7().x1(i10);
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kotlin.jvm.functions.Function2
        public /* bridge */ /* synthetic */ Unit invoke(Integer num, rv.g gVar) {
            a(num.intValue(), gVar);
            return Unit.INSTANCE;
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: AlphaLiveMomentsActivity.kt */
    public static final class e extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaLiveMomentsActivity f44552a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public e(AlphaLiveMomentsActivity alphaLiveMomentsActivity) {
            super(0);
            this.f44552a = alphaLiveMomentsActivity;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            this.f44552a.close();
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"Lqv/n;", "a", "()Lqv/n;"}, k = 3, mv = {1, 6, 0})
    /* compiled from: AlphaLiveMomentsActivity.kt */
    public static final class f extends Lambda implements Function0<n> {

        /* renamed from: a  reason: collision with root package name */
        public static final f f44553a = new f();

        public f() {
            super(0);
        }

        /* renamed from: a */
        public final n invoke() {
            return new n();
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0004\u0010\u0004\u001a\n \u0001*\u0004\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lyj2/g;", "kotlin.jvm.PlatformType", "invoke", "()Lyj2/g;", "<anonymous>"}, k = 3, mv = {1, 6, 0})
    /* compiled from: AlphaLiveMomentsActivity.kt */
    public static final class g extends Lambda implements Function0<yj2.g> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaLiveMomentsActivity f44554a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public g(AlphaLiveMomentsActivity alphaLiveMomentsActivity) {
            super(0);
            this.f44554a = alphaLiveMomentsActivity;
        }

        @Override // kotlin.jvm.functions.Function0
        public final yj2.g invoke() {
            yj2.g a14 = yj2.g.a(this.f44554a);
            a14.setCancelable(false);
            return a14;
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: AlphaLiveMomentsActivity.kt */
    public static final class h extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaLiveMomentsActivity f44555a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public h(AlphaLiveMomentsActivity alphaLiveMomentsActivity) {
            super(0);
            this.f44555a = alphaLiveMomentsActivity;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            AlphaEventsWebActivity.a aVar = AlphaEventsWebActivity.f45671n;
            AlphaLiveMomentsActivity alphaLiveMomentsActivity = this.f44555a;
            AlphaEventsWebActivity.a.c(aVar, alphaLiveMomentsActivity, u.f131753a.V() + "&live_from_source=live_end", null, false, -1, false, 36, null);
            o.f123660a.f(this.f44555a.E7().e1());
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: AlphaLiveMomentsActivity.kt */
    public static final class i extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AlphaLiveMomentsActivity f44556a;

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ UserLatestLivePreviewBean f44557b;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public i(AlphaLiveMomentsActivity alphaLiveMomentsActivity, UserLatestLivePreviewBean userLatestLivePreviewBean) {
            super(0);
            this.f44556a = alphaLiveMomentsActivity;
            this.f44557b = userLatestLivePreviewBean;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            this.f44556a.E7().y1(this.f44557b.getTrailerId());
            p.c();
        }
    }

    @Override // ll.i
    public void D(boolean z14) {
        if (z14) {
            yj2.g F7 = F7();
            if (F7 != null) {
                F7.show();
                return;
            }
            return;
        }
        yj2.g F72 = F7();
        if (F72 != null) {
            F72.dismiss();
        }
    }

    public final n E7() {
        return (n) this.f44546b.getValue();
    }

    public final yj2.g F7() {
        Object value = this.f44545a.getValue();
        Intrinsics.checkNotNullExpressionValue(value, "<get-progressNormalDialog>(...)");
        return (yj2.g) value;
    }

    public final void G7() {
        if (E7().s1()) {
            l.q((LinearLayout) _$_findCachedViewById(R$id.azn));
            ImageView imageView = (ImageView) _$_findCachedViewById(R$id.diw);
            Intrinsics.checkNotNullExpressionValue(imageView, "momentsSettingView");
            q1.S(imageView, 0, new a(this), 1, null);
            ImageView imageView2 = (ImageView) _$_findCachedViewById(R$id.div);
            Intrinsics.checkNotNullExpressionValue(imageView2, "momentsDetailView");
            q1.S(imageView2, 0, new b(this), 1, null);
            I7();
        }
    }

    public final void H7() {
        MultiTypeAdapter multiTypeAdapter = new MultiTypeAdapter(null, 0, null, 7, null);
        vv.c cVar = new vv.c();
        cVar.f(new d(this));
        vv.b bVar = new vv.b(E7().s1());
        bVar.g(new c(this));
        vv.d dVar = new vv.d();
        multiTypeAdapter.k(rv.g.class, cVar);
        multiTypeAdapter.k(rv.d.class, bVar);
        multiTypeAdapter.k(rv.i.class, dVar);
        int i10 = R$id.cq_;
        ((RecyclerView) _$_findCachedViewById(i10)).setAdapter(multiTypeAdapter);
        ((RecyclerView) _$_findCachedViewById(i10)).setLayoutManager(new LinearLayoutManager(this, 1, false));
    }

    public final void I7() {
        q qVar = q.f131738a;
        if (qVar.b()) {
            AlphaTextView alphaTextView = new AlphaTextView(this, null, 0, 6, null);
            float f14 = (float) TbsListener.ErrorCode.INCRUPDATE_INSTALL_SUCCESS;
            Resources system = Resources.getSystem();
            Intrinsics.checkExpressionValueIsNotNull(system, "Resources.getSystem()");
            alphaTextView.setWidth((int) TypedValue.applyDimension(1, f14, system.getDisplayMetrics()));
            alphaTextView.setMaxLines(2);
            alphaTextView.setTextColorResId(R$color.xhsTheme_colorGrayPatch1_unchanged);
            alphaTextView.setTextSize(14.0f);
            alphaTextView.setTextResId(R$string.aac);
            float f15 = (float) 8;
            Resources system2 = Resources.getSystem();
            Intrinsics.checkExpressionValueIsNotNull(system2, "Resources.getSystem()");
            Resources system3 = Resources.getSystem();
            Intrinsics.checkExpressionValueIsNotNull(system3, "Resources.getSystem()");
            Resources system4 = Resources.getSystem();
            Intrinsics.checkExpressionValueIsNotNull(system4, "Resources.getSystem()");
            Resources system5 = Resources.getSystem();
            Intrinsics.checkExpressionValueIsNotNull(system5, "Resources.getSystem()");
            alphaTextView.setPadding((int) TypedValue.applyDimension(1, f15, system2.getDisplayMetrics()), (int) TypedValue.applyDimension(1, f15, system3.getDisplayMetrics()), (int) TypedValue.applyDimension(1, f15, system4.getDisplayMetrics()), (int) TypedValue.applyDimension(1, f15, system5.getDisplayMetrics()));
            b0.b f04 = new b0.b((ImageView) _$_findCachedViewById(R$id.diw), "alpha_moments_setting_tips").N(2).W().M().f0();
            Resources system6 = Resources.getSystem();
            Intrinsics.checkExpressionValueIsNotNull(system6, "Resources.getSystem()");
            b0.b O = f04.h0(TypedValue.applyDimension(1, f15, system6.getDisplayMetrics())).Q(alphaTextView).O(-1);
            Resources system7 = Resources.getSystem();
            Intrinsics.checkExpressionValueIsNotNull(system7, "Resources.getSystem()");
            O.V(-((int) TypedValue.applyDimension(1, (float) 5, system7.getDisplayMetrics()))).i0(false).T().b(3);
            qVar.W();
        }
    }

    @Override // qv.b
    public void J0() {
        ((AlphaLiveMomentsTrailerView) _$_findCachedViewById(R$id.fuo)).setSubscribeState(true);
    }

    @Override // qv.b
    public void K0() {
        int i10;
        l.b((RecyclerView) _$_findCachedViewById(R$id.cq_));
        l.q(_$_findCachedViewById(R$id.emptyView));
        if (!NetStatusUtil.isConnected(this)) {
            i10 = R$string.afh;
        } else {
            i10 = R$string.aa9;
        }
        ((TextView) _$_findCachedViewById(R$id.b35)).setText(getString(i10));
    }

    @Override // qv.b
    public void M2(int i10, int i14, boolean z14) {
        int i15;
        RecyclerView.Adapter adapter = ((RecyclerView) _$_findCachedViewById(R$id.cq_)).getAdapter();
        if (adapter != null) {
            adapter.notifyDataSetChanged();
        }
        f0 f0Var = f0.f131631a;
        if (z14) {
            i15 = R$string.aqv;
        } else {
            i15 = R$string.aqu;
        }
        f0.c(f0Var, i15, 0, 2, null);
    }

    @Override // qv.b
    public void S2(rv.b bVar) {
        Intrinsics.checkNotNullParameter(bVar, "hostInfo");
        l.q((LinearLayout) _$_findCachedViewById(R$id.userInfoLayout));
        XYImageView xYImageView = (XYImageView) _$_findCachedViewById(R$id.avatarView);
        String a14 = bVar.a();
        float f14 = (float) 40;
        Resources system = Resources.getSystem();
        Intrinsics.checkExpressionValueIsNotNull(system, "Resources.getSystem()");
        Resources system2 = Resources.getSystem();
        Intrinsics.checkExpressionValueIsNotNull(system2, "Resources.getSystem()");
        g9.c.h(xYImageView, a14, (int) TypedValue.applyDimension(1, f14, system.getDisplayMetrics()), (int) TypedValue.applyDimension(1, f14, system2.getDisplayMetrics()), null, g0.f72750a.E(), null, 40, null);
        ((XYTextView) _$_findCachedViewById(R$id.nickname)).setText(bVar.b());
    }

    @Override // qv.b
    public void S6(ArrayList<rv.c> arrayList) {
        Intrinsics.checkNotNullParameter(arrayList, "list");
        if (arrayList.isEmpty()) {
            K0();
            return;
        }
        l.q((TextView) _$_findCachedViewById(R$id.cqi));
        int i10 = R$id.cq_;
        l.q((RecyclerView) _$_findCachedViewById(i10));
        l.b(_$_findCachedViewById(R$id.emptyView));
        RecyclerView.Adapter adapter = ((RecyclerView) _$_findCachedViewById(i10)).getAdapter();
        if (adapter != null) {
            MultiTypeAdapter multiTypeAdapter = (MultiTypeAdapter) adapter;
            multiTypeAdapter.o(arrayList);
            multiTypeAdapter.notifyDataSetChanged();
        }
    }

    @Override // com.xingin.android.redutils.base.BaseActivity
    public void _$_clearFindViewByIdCache() {
        this.f44547c.clear();
    }

    @Override // com.xingin.android.redutils.base.BaseActivity
    public View _$_findCachedViewById(int i10) {
        Map<Integer, View> map = this.f44547c;
        View view = map.get(Integer.valueOf(i10));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i10);
        if (findViewById == null) {
            return null;
        }
        map.put(Integer.valueOf(i10), findViewById);
        return findViewById;
    }

    @Override // qv.b
    public void close() {
        finish();
    }

    public final void initView() {
        int i10;
        if (gu2.a.k()) {
            i10 = com.xingin.alpha.R$color.xhsTheme_colorGrayLevel1;
        } else {
            i10 = com.xingin.alpha.R$color.xhsTheme_colorGrayLevel1_night;
        }
        int i14 = R$id.backBtn;
        ((ImageView) _$_findCachedViewById(i14)).setImageTintList(ColorStateList.valueOf(getResources().getColor(i10)));
        ImageView imageView = (ImageView) _$_findCachedViewById(i14);
        Intrinsics.checkNotNullExpressionValue(imageView, "backBtn");
        q1.S(imageView, 0, new e(this), 1, null);
        if (gu2.a.l(this)) {
            ((XYImageView) _$_findCachedViewById(R$id.f39862ivHeader)).o("https://picasso-static.xiaohongshu.com/fe-platform/ca122d3c6275a9e908a14ae8c32812b2caf22ee9.png", g0.f72750a.E());
        } else {
            ((XYImageView) _$_findCachedViewById(R$id.f39862ivHeader)).o("https://picasso-static.xiaohongshu.com/fe-platform/2073a050fc3e6447ef667225e336a40dbb5578f3.png", g0.f72750a.E());
        }
        G7();
        H7();
    }

    @Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.xingin.android.redutils.base.BaseActivity
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        disableSwipeBack();
        setContentView(R$layout.f39954alpha_activity_live_moments);
        E7().i0(this, this);
        PageLiveEmceeMoments pageLiveEmceeMoments = (PageLiveEmceeMoments) getIntent().getParcelableExtra(Page.PAGE_OBJ_KEY);
        if (pageLiveEmceeMoments == null) {
            close();
            return;
        }
        E7().r1(pageLiveEmceeMoments);
        initView();
        p.a();
    }

    @Override // androidx.fragment.app.FragmentActivity, com.xingin.android.redutils.base.BaseActivity
    public void onResume() {
        super.onResume();
        E7().B1();
    }

    @Override // qv.b
    public void t4(UserLatestLivePreviewBean userLatestLivePreviewBean) {
        Intrinsics.checkNotNullParameter(userLatestLivePreviewBean, "previewBean");
        if (E7().s1() && !userLatestLivePreviewBean.getHasPreview()) {
            int i10 = R$id.fuo;
            ((AlphaLiveMomentsTrailerView) _$_findCachedViewById(i10)).o0();
            XYTextView subscribeBtn = ((AlphaLiveMomentsTrailerView) _$_findCachedViewById(i10)).getSubscribeBtn();
            Intrinsics.checkNotNullExpressionValue(subscribeBtn, "trailerView.getSubscribeBtn()");
            q1.S(subscribeBtn, 0, new h(this), 1, null);
        } else if (userLatestLivePreviewBean.getHasPreview()) {
            l.q((TextView) _$_findCachedViewById(R$id.cqi));
            int i14 = R$id.fuo;
            ((AlphaLiveMomentsTrailerView) _$_findCachedViewById(i14)).n0(E7().s1(), userLatestLivePreviewBean);
            XYTextView subscribeBtn2 = ((AlphaLiveMomentsTrailerView) _$_findCachedViewById(i14)).getSubscribeBtn();
            Intrinsics.checkNotNullExpressionValue(subscribeBtn2, "trailerView.getSubscribeBtn()");
            q1.S(subscribeBtn2, 0, new i(this, userLatestLivePreviewBean), 1, null);
        }
    }
}