得物.apk(点击下载) / h.java


package f71;

import android.os.CountDownTimer;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.github.penfeizhou.animation.apng.APNGDrawable;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.yeezy.Yeezy;
import com.shizhuang.duapp.libs.yeezy.listener.YeezyListener;
import com.shizhuang.duapp.libs.yeezy.model.YeezyEntry;
import com.shizhuang.duapp.modules.productv2.model.SxsLotteryModel;
import com.shizhuang.duapp.modules.productv2.sxs.SxsLotteryDialogFragment;
import com.shizhuang.duapp.modules.productv2.sxs.UnTouchedRecyclerView;
import java.util.List;
import kotlin.collections.CollectionsKt___CollectionsKt;
import o5.i;
import org.jetbrains.annotations.Nullable;

/* compiled from: SxsLotteryDialogFragment.kt */
public final class h implements Runnable {
    public static ChangeQuickRedirect changeQuickRedirect;
    public final /* synthetic */ SxsLotteryDialogFragment b;

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

    /* compiled from: SxsLotteryDialogFragment.kt */
    public static final class a extends YeezyListener {
        public static ChangeQuickRedirect changeQuickRedirect;

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

        /* JADX WARN: Incorrect args count in method signature: ()V */
        public a(h hVar) {
            this.f32140a = hVar;
        }

        @Override // com.shizhuang.duapp.libs.yeezy.listener.YeezyListener
        public void onError(@Nullable String str) {
            boolean z = PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 303526, new Class[]{String.class}, Void.TYPE).isSupported;
        }

        @Override // com.shizhuang.duapp.libs.yeezy.listener.YeezyListener
        public void onSuccess(@Nullable List<String> list, @Nullable List<YeezyEntry> list2) {
            boolean z = false;
            if (!PatchProxy.proxy(new Object[]{list, list2}, this, changeQuickRedirect, false, 303525, new Class[]{List.class, List.class}, Void.TYPE).isSupported) {
                if (list == null || list.isEmpty()) {
                    z = true;
                }
                if (!z) {
                    APNGDrawable a5 = APNGDrawable.a((String) CollectionsKt___CollectionsKt.first((List) list));
                    a5.f4433c.f = 1;
                    ImageView imageView = (ImageView) this.f32140a.b._$_findCachedViewById(R.id.animFlowerView);
                    if (imageView != null) {
                        imageView.setImageDrawable(a5);
                    }
                }
            }
        }
    }

    /* compiled from: SxsLotteryDialogFragment.kt */
    public static final class b extends YeezyListener {
        public static ChangeQuickRedirect changeQuickRedirect;

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

        /* JADX WARN: Incorrect args count in method signature: ()V */
        public b(h hVar) {
            this.f32141a = hVar;
        }

        @Override // com.shizhuang.duapp.libs.yeezy.listener.YeezyListener
        public void onError(@Nullable String str) {
            boolean z = PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 303528, new Class[]{String.class}, Void.TYPE).isSupported;
        }

        @Override // com.shizhuang.duapp.libs.yeezy.listener.YeezyListener
        public void onSuccess(@Nullable List<String> list, @Nullable List<YeezyEntry> list2) {
            boolean z = false;
            if (!PatchProxy.proxy(new Object[]{list, list2}, this, changeQuickRedirect, false, 303527, new Class[]{List.class, List.class}, Void.TYPE).isSupported) {
                if (list == null || list.isEmpty()) {
                    z = true;
                }
                if (!z) {
                    APNGDrawable a5 = APNGDrawable.a((String) CollectionsKt___CollectionsKt.first((List) list));
                    ImageView imageView = (ImageView) this.f32141a.b._$_findCachedViewById(R.id.cardStartFlowerView);
                    if (imageView != null) {
                        imageView.setImageDrawable(a5);
                    }
                }
            }
        }
    }

    public h(SxsLotteryDialogFragment sxsLotteryDialogFragment, SxsLotteryModel sxsLotteryModel) {
        this.b = sxsLotteryDialogFragment;
        this.f32139c = sxsLotteryModel;
    }

    public final void run() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 303524, new Class[0], Void.TYPE).isSupported) {
            Yeezy.Companion companion = Yeezy.Companion;
            companion.load(false, this.b.requireContext(), new a(this), "41e9384ea858ec6f53ad61fa2385bff6");
            companion.load(false, this.b.requireContext(), new b(this), "94cf2c0f02f57333a8b32427e8621964");
            float f = 1.0f;
            ((DuImageLoaderView) this.b._$_findCachedViewById(R.id.sxsResultTitle)).setAlpha(1.0f);
            ((DuImageLoaderView) this.b._$_findCachedViewById(R.id.animBgView)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/du_product/sxs_result_card_bg.png").x();
            this.b.j();
            SxsLotteryDialogFragment sxsLotteryDialogFragment = this.b;
            if (!PatchProxy.proxy(new Object[0], sxsLotteryDialogFragment, SxsLotteryDialogFragment.changeQuickRedirect, false, 303469, new Class[0], Void.TYPE).isSupported) {
                ((DuImageLoaderView) sxsLotteryDialogFragment._$_findCachedViewById(R.id.sxsOpenButtonImageView)).h(R.drawable.sxs_button_bg).x();
                ((LinearLayout) sxsLotteryDialogFragment._$_findCachedViewById(R.id.sxsOpenButtonLayout)).setVisibility(0);
                ((TextView) sxsLotteryDialogFragment._$_findCachedViewById(R.id.countdownView)).setAlpha(1.0f);
                ((LinearLayout) sxsLotteryDialogFragment._$_findCachedViewById(R.id.sxsOpenButtonLayout)).setScaleX(1.0f);
                ((LinearLayout) sxsLotteryDialogFragment._$_findCachedViewById(R.id.sxsOpenButtonLayout)).setScaleY(1.0f);
                sxsLotteryDialogFragment.f24189c.postDelayed(new i(sxsLotteryDialogFragment), 500);
            }
            SxsLotteryDialogFragment sxsLotteryDialogFragment2 = this.b;
            sxsLotteryDialogFragment2.k((UnTouchedRecyclerView) sxsLotteryDialogFragment2._$_findCachedViewById(R.id.danmuViewBottom), this.f32139c.getDanmus());
            ((DuImageLoaderView) this.b._$_findCachedViewById(R.id.holoView)).setAlpha(1.0f);
            ((ImageView) this.b._$_findCachedViewById(R.id.closeViewB)).setVisibility(0);
            ((TextView) this.b._$_findCachedViewById(R.id.sxsOpenButtonTextView)).setText(this.f32139c.getOpenText());
            SxsLotteryDialogFragment sxsLotteryDialogFragment3 = this.b;
            SxsLotteryModel sxsLotteryModel = this.f32139c;
            if (!PatchProxy.proxy(new Object[]{sxsLotteryModel}, sxsLotteryDialogFragment3, SxsLotteryDialogFragment.changeQuickRedirect, false, 303481, new Class[]{SxsLotteryModel.class}, Void.TYPE).isSupported) {
                TextView textView = (TextView) sxsLotteryDialogFragment3._$_findCachedViewById(R.id.countdownView);
                if (sxsLotteryModel.getCountDownEndTime() <= 0) {
                    f = i.f36333a;
                }
                textView.setAlpha(f);
                long countDownEndTime = sxsLotteryModel.getCountDownEndTime() - (System.currentTimeMillis() - he.a.d.getTimeOffset());
                if (countDownEndTime > 0) {
                    CountDownTimer countDownTimer = sxsLotteryDialogFragment3.e;
                    if (countDownTimer != null) {
                        countDownTimer.cancel();
                    }
                    sxsLotteryDialogFragment3.e = new l(sxsLotteryDialogFragment3, countDownEndTime, countDownEndTime, 1000).start();
                    return;
                }
                ((TextView) sxsLotteryDialogFragment3._$_findCachedViewById(R.id.countdownView)).setText("00:00:00后低价失效");
            }
        }
    }
}