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


package com.shizhuang.duapp.modules.mall_seller.merchant.margin;

import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.Keep;
import androidx.annotation.Nullable;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.lifecycle.ViewModelLazy;
import co.c;
import co.d;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.knightboost.weaver.api.Scope;
import com.knightboost.weaver.api.annotations.Insert;
import com.knightboost.weaver.api.annotations.TargetClass;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.event.SCEvent;
import com.shizhuang.duapp.common.ui.BaseLeftBackActivity;
import com.shizhuang.duapp.common.utils.livebus.PageEventBus;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.mall_seller.merchant.margin.helper.HalfExpandedUiHelper;
import com.shizhuang.duapp.modules.mall_seller.merchant.margin.viewmodel.SellerSVIPMarginViewModel;
import com.shizhuang.model.event.MessageEvent;
import df.r0;
import java.util.HashMap;
import jn.b;
import kotlin.Lazy;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import nu0.a;
import org.jetbrains.annotations.NotNull;

@Route(path = "/seller/SellerSVIPMarginPage")
@Metadata(bv = {}, d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0006\u0010\u0007J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0016¨\u0006\b"}, d2 = {"Lcom/shizhuang/duapp/modules/mall_seller/merchant/margin/SellerSVIPMarginActivity;", "Lcom/shizhuang/duapp/common/ui/BaseLeftBackActivity;", "Lcom/shizhuang/duapp/common/event/SCEvent;", "event", "", "onEvent", "<init>", "()V", "du_mall_seller_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: SellerSVIPMarginActivity.kt */
public final class SellerSVIPMarginActivity extends BaseLeftBackActivity {
    public static ChangeQuickRedirect changeQuickRedirect;

    /* renamed from: c  reason: collision with root package name */
    public final Lazy f20373c = new ViewModelLazy(Reflection.getOrCreateKotlinClass(SellerSVIPMarginViewModel.class), new SellerSVIPMarginActivity$$special$$inlined$viewModels$2(this), new SellerSVIPMarginActivity$$special$$inlined$viewModels$1(this));
    public HalfExpandedUiHelper d;
    public HashMap e;

    public class _boostWeave {
        public static ChangeQuickRedirect changeQuickRedirect;

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onCreate")
        @Keep
        public static void ActivityMethodWeaver_onCreate(@Nullable SellerSVIPMarginActivity sellerSVIPMarginActivity, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{sellerSVIPMarginActivity, bundle}, null, changeQuickRedirect, true, 227782, new Class[]{SellerSVIPMarginActivity.class, Bundle.class}, Void.TYPE).isSupported) {
                b bVar = b.f34396a;
                if (!bVar.b()) {
                    bVar.d(true);
                }
                long currentTimeMillis = System.currentTimeMillis();
                SellerSVIPMarginActivity.d(sellerSVIPMarginActivity, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (sellerSVIPMarginActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.mall_seller.merchant.margin.SellerSVIPMarginActivity")) {
                    bVar.activityOnCreateMethod(sellerSVIPMarginActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onResume")
        @Keep
        public static void ActivityMethodWeaver_onResume(SellerSVIPMarginActivity sellerSVIPMarginActivity) {
            if (!PatchProxy.proxy(new Object[]{sellerSVIPMarginActivity}, null, changeQuickRedirect, true, 227784, new Class[]{SellerSVIPMarginActivity.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                SellerSVIPMarginActivity.f(sellerSVIPMarginActivity);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (sellerSVIPMarginActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.mall_seller.merchant.margin.SellerSVIPMarginActivity")) {
                    b.f34396a.activityOnResumeMethod(sellerSVIPMarginActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onStart")
        @Keep
        public static void ActivityMethodWeaver_onStart(SellerSVIPMarginActivity sellerSVIPMarginActivity) {
            if (!PatchProxy.proxy(new Object[]{sellerSVIPMarginActivity}, null, changeQuickRedirect, true, 227783, new Class[]{SellerSVIPMarginActivity.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                SellerSVIPMarginActivity.e(sellerSVIPMarginActivity);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (sellerSVIPMarginActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.mall_seller.merchant.margin.SellerSVIPMarginActivity")) {
                    b.f34396a.activityOnStartMethod(sellerSVIPMarginActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }
    }

    public static void d(SellerSVIPMarginActivity sellerSVIPMarginActivity, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, sellerSVIPMarginActivity, changeQuickRedirect, false, 227775, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onCreate(bundle);
        }
    }

    public static void e(SellerSVIPMarginActivity sellerSVIPMarginActivity) {
        if (!PatchProxy.proxy(new Object[0], sellerSVIPMarginActivity, changeQuickRedirect, false, 227777, new Class[0], Void.TYPE).isSupported) {
            super.onStart();
        }
    }

    public static void f(SellerSVIPMarginActivity sellerSVIPMarginActivity) {
        if (!PatchProxy.proxy(new Object[0], sellerSVIPMarginActivity, changeQuickRedirect, false, 227779, new Class[0], Void.TYPE).isSupported) {
            super.onResume();
        }
    }

    public View _$_findCachedViewById(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 227772, new Class[]{Integer.TYPE}, View.class);
        if (proxy.isSupported) {
            return (View) proxy.result;
        }
        if (this.e == null) {
            this.e = new HashMap();
        }
        View view = (View) this.e.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i);
        this.e.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    public final SellerSVIPMarginViewModel g() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 227761, new Class[0], SellerSVIPMarginViewModel.class);
        return (SellerSVIPMarginViewModel) (proxy.isSupported ? proxy.result : this.f20373c.getValue());
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public int getLayout() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 227762, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.activity_seller_svip_margin;
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initData() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 227764, new Class[0], Void.TYPE).isSupported) {
            SellerSVIPMarginViewModel.fetchData$default(g(), false, 1, null);
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initStatusBar() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 227765, new Class[0], Void.TYPE).isSupported) {
            r0.q(this, Color.parseColor("#2b2c3c"), null);
            Drawable navigationIcon = this.toolbar.getNavigationIcon();
            if (navigationIcon != null) {
                DrawableCompat.setTint(navigationIcon, -1);
            }
            this.toolbar.setTitleTextColor(-1);
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initView(@org.jetbrains.annotations.Nullable Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 227763, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.initView(bundle);
            float f = (float) 20;
            ((c) ((DuImageLoaderView) _$_findCachedViewById(R.id.icOldSellerMargin)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/merchant/icon_payment_line@3x.png").v(new d(fi.b.b(f), fi.b.b(f)))).x();
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 227766, new Class[0], Void.TYPE).isSupported) {
                ((CoordinatorLayout) _$_findCachedViewById(R.id.clRoot)).post(new a(this));
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 227767, new Class[0], Void.TYPE).isSupported) {
                g().getHeaderLiveData().observe(this, new SellerSVIPMarginActivity$initObserver$1(this));
                PageEventBus.h(this).c("SVIP_MARGINS_WITCH_EXPAND_STATE").observe(this, new SellerSVIPMarginActivity$initObserver$2(this));
            }
        }
    }

    @Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onCreate(Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 227774, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onCreate(this, bundle);
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void onEvent(@NotNull SCEvent sCEvent) {
        if (!PatchProxy.proxy(new Object[]{sCEvent}, this, changeQuickRedirect, false, 227771, new Class[]{SCEvent.class}, Void.TYPE).isSupported) {
            super.onEvent(sCEvent);
            if (sCEvent instanceof MessageEvent) {
                MessageEvent messageEvent = (MessageEvent) sCEvent;
                if (Intrinsics.areEqual(messageEvent.getMessage(), "MSG_MERCHANT_MARGIN_RECHARGE_SUCCESS") || Intrinsics.areEqual(messageEvent.getMessage(), "SIGN_OUT_APPLY_SUCCESS")) {
                    finish();
                }
            }
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void onNetErrorRetryClick() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 227770, new Class[0], Void.TYPE).isSupported) {
            initData();
        }
    }

    @Override // androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onResume() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 227778, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onResume(this);
        }
    }

    @Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onStart() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 227776, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onStart(this);
        }
    }
}