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


package com.shizhuang.duapp.modules.du_community_common.dialog;

import ae.m;
import ae.u;
import android.animation.ValueAnimator;
import android.content.Context;
import android.os.Bundle;
import android.text.Html;
import android.view.GestureDetector;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import bf.h;
import butterknife.BindView;
import butterknife.OnClick;
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.meizu.cloud.pushsdk.constants.PushConstants;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.dialog.BaseDialogFragment;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuRequestOptions;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuScaleType;
import com.shizhuang.duapp.modules.du_community_common.model.CommunityFeedModel;
import com.shizhuang.duapp.modules.du_community_common.model.MediaItemModel;
import com.shizhuang.duapp.modules.du_community_common.model.user.CommunityCreatorModel;
import com.shizhuang.duapp.modules.du_community_common.model.user.CouponInfo;
import com.shizhuang.duapp.modules.du_community_common.model.user.FirstVideoInfo;
import com.shizhuang.duapp.modules.du_community_common.model.user.LevelInfo;
import com.shizhuang.duapp.modules.du_community_common.model.user.TaskInfo;
import com.shizhuang.duapp.modules.du_community_common.sensor.SensorCommunitySharePlatform;
import com.shizhuang.duapp.modules.router.ServiceManager;
import com.shizhuang.duapp.modules.share.constance.SHARE_MEDIA;
import df.k0;
import df.o0;
import ec.y;
import kotlin.Pair;
import my.c;
import o5.i;
import pb1.l;
import q20.n;
import q20.o;
import q20.p;
import q20.q;
import q20.r;
import q20.t;
import td.s;
import u.c0;
import y20.b0;

public class ShareActivityFragmentDialog extends BaseDialogFragment {
    public static ChangeQuickRedirect changeQuickRedirect;
    @BindView(5032)
    public TextView checkRewardBtn;
    @BindView(5061)
    public ConstraintLayout clLevel;
    @BindView(5063)
    public ConstraintLayout clTask;
    @BindView(5065)
    public ConstraintLayout clVideoTask;
    @BindView(5571)
    public DuImageLoaderView cover;
    public boolean e = true;
    public boolean f;

    /* renamed from: g  reason: collision with root package name */
    public ValueAnimator f12752g;

    /* renamed from: h  reason: collision with root package name */
    public long f12753h = 6000;
    public CommunityFeedModel i;
    @BindView(5570)
    public DuImageLoaderView ivCompleteState;
    public l j;
    public GestureDetector k;
    public String l;
    @BindView(6541)
    public TextView levelLeft;
    @BindView(6542)
    public TextView levelRight;
    public Runnable m = new c0(this, 6);
    public GestureDetector.SimpleOnGestureListener n = new a();
    @BindView(6572)
    public TextView processDesc;
    @BindView(5877)
    public ProgressBar progressBar;
    @BindView(6152)
    public RelativeLayout rootContainer;
    @BindView(6614)
    public TextView taskName;
    @BindView(6624)
    public TextView title;
    @BindView(6306)
    public ConstraintLayout trafficTicketContainer;
    @BindView(6307)
    public DuImageLoaderView trafficTicketIcon;
    @BindView(6308)
    public TextView trafficTicketText;
    @BindView(6309)
    public TextView trafficTicketTitle;
    @BindView(6503)
    public TextView tvCompleteState;
    @BindView(6526)
    public TextView tvGetPrice;
    @BindView(6527)
    public TextView tvGo;
    @BindView(6650)
    public TextView tvVideoTaskTitle;

    public class _boostWeave {
        public static ChangeQuickRedirect changeQuickRedirect;

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onCreate")
        @Keep
        public static void FragmentMethodWeaver_onCreate(ShareActivityFragmentDialog shareActivityFragmentDialog, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{shareActivityFragmentDialog, bundle}, null, changeQuickRedirect, true, 99640, new Class[]{ShareActivityFragmentDialog.class, Bundle.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                ShareActivityFragmentDialog.s(shareActivityFragmentDialog, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (shareActivityFragmentDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.du_community_common.dialog.ShareActivityFragmentDialog")) {
                    jn.b.f34396a.fragmentOnCreateMethod(shareActivityFragmentDialog, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onCreateView")
        @Keep
        public static View FragmentMethodWeaver_onCreateView(@NonNull ShareActivityFragmentDialog shareActivityFragmentDialog, @Nullable LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, Bundle bundle) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{shareActivityFragmentDialog, layoutInflater, viewGroup, bundle}, null, changeQuickRedirect, true, 99643, new Class[]{ShareActivityFragmentDialog.class, LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
            if (proxy.isSupported) {
                return (View) proxy.result;
            }
            long currentTimeMillis = System.currentTimeMillis();
            View v4 = ShareActivityFragmentDialog.v(shareActivityFragmentDialog, layoutInflater, viewGroup, bundle);
            long currentTimeMillis2 = System.currentTimeMillis();
            if (shareActivityFragmentDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.du_community_common.dialog.ShareActivityFragmentDialog")) {
                jn.b.f34396a.fragmentOnCreateViewMethod(shareActivityFragmentDialog, currentTimeMillis, currentTimeMillis2);
            }
            return v4;
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onResume")
        @Keep
        public static void FragmentMethodWeaver_onResume(ShareActivityFragmentDialog shareActivityFragmentDialog) {
            if (!PatchProxy.proxy(new Object[]{shareActivityFragmentDialog}, null, changeQuickRedirect, true, 99641, new Class[]{ShareActivityFragmentDialog.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                ShareActivityFragmentDialog.t(shareActivityFragmentDialog);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (shareActivityFragmentDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.du_community_common.dialog.ShareActivityFragmentDialog")) {
                    jn.b.f34396a.fragmentOnResumeMethod(shareActivityFragmentDialog, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onStart")
        @Keep
        public static void FragmentMethodWeaver_onStart(ShareActivityFragmentDialog shareActivityFragmentDialog) {
            if (!PatchProxy.proxy(new Object[]{shareActivityFragmentDialog}, null, changeQuickRedirect, true, 99642, new Class[]{ShareActivityFragmentDialog.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                ShareActivityFragmentDialog.u(shareActivityFragmentDialog);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (shareActivityFragmentDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.du_community_common.dialog.ShareActivityFragmentDialog")) {
                    jn.b.f34396a.fragmentOnStartMethod(shareActivityFragmentDialog, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onViewCreated")
        @Keep
        public static void FragmentMethodWeaver_onViewCreated(@NonNull ShareActivityFragmentDialog shareActivityFragmentDialog, @Nullable View view, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{shareActivityFragmentDialog, view, bundle}, null, changeQuickRedirect, true, 99644, new Class[]{ShareActivityFragmentDialog.class, View.class, Bundle.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                ShareActivityFragmentDialog.w(shareActivityFragmentDialog, view, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (shareActivityFragmentDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.du_community_common.dialog.ShareActivityFragmentDialog")) {
                    jn.b.f34396a.fragmentOnViewCreatedMethod(shareActivityFragmentDialog, currentTimeMillis, currentTimeMillis2);
                }
            }
        }
    }

    public class a extends GestureDetector.SimpleOnGestureListener {
        public static ChangeQuickRedirect changeQuickRedirect;

        public a() {
        }

        public boolean onDown(MotionEvent motionEvent) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{motionEvent}, this, changeQuickRedirect, false, 99635, new Class[]{MotionEvent.class}, Boolean.TYPE);
            if (proxy.isSupported) {
                return ((Boolean) proxy.result).booleanValue();
            }
            return true;
        }

        public boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f12) {
            Object[] objArr = {motionEvent, motionEvent2, new Float(f), new Float(f12)};
            ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
            Class cls = Float.TYPE;
            PatchProxyResult proxy = PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 99636, new Class[]{MotionEvent.class, MotionEvent.class, cls, cls}, Boolean.TYPE);
            if (proxy.isSupported) {
                return ((Boolean) proxy.result).booleanValue();
            }
            float y = motionEvent2.getY() - motionEvent.getY();
            float x = motionEvent2.getX() - motionEvent.getX();
            if (Math.abs(f12) < 100.0f || y > -8.0f || Math.abs(y) < Math.abs(x)) {
                return false;
            }
            ShareActivityFragmentDialog shareActivityFragmentDialog = ShareActivityFragmentDialog.this;
            shareActivityFragmentDialog.cover.removeCallbacks(shareActivityFragmentDialog.m);
            ShareActivityFragmentDialog.this.m.run();
            return true;
        }
    }

    public class b extends s<String> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ SHARE_MEDIA b;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public b(Context context, SHARE_MEDIA share_media) {
            super(context);
            this.b = share_media;
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
        public void onSuccess(Object obj) {
            String str = (String) obj;
            if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 99639, new Class[]{String.class}, Void.TYPE).isSupported) {
                super.onSuccess(str);
                ShareActivityFragmentDialog shareActivityFragmentDialog = ShareActivityFragmentDialog.this;
                shareActivityFragmentDialog.l = str;
                shareActivityFragmentDialog.j.e(b0.c(shareActivityFragmentDialog.i, str));
                ShareActivityFragmentDialog.this.x(this.b);
            }
        }
    }

    public static void s(ShareActivityFragmentDialog shareActivityFragmentDialog, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, shareActivityFragmentDialog, changeQuickRedirect, false, 99582, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onCreate(bundle);
            shareActivityFragmentDialog.setStyle(1, R.style.TopDialog);
        }
    }

    public static void t(ShareActivityFragmentDialog shareActivityFragmentDialog) {
        if (!PatchProxy.proxy(new Object[0], shareActivityFragmentDialog, changeQuickRedirect, false, 99595, new Class[0], Void.TYPE).isSupported) {
            super.onResume();
            if (!PatchProxy.proxy(new Object[0], shareActivityFragmentDialog, changeQuickRedirect, false, 99599, new Class[0], Void.TYPE).isSupported && shareActivityFragmentDialog.e) {
                long j12 = shareActivityFragmentDialog.f12753h;
                if (j12 >= 0) {
                    shareActivityFragmentDialog.cover.postDelayed(shareActivityFragmentDialog.m, j12);
                }
            }
            System.currentTimeMillis();
        }
    }

    public static void u(ShareActivityFragmentDialog shareActivityFragmentDialog) {
        if (!PatchProxy.proxy(new Object[0], shareActivityFragmentDialog, changeQuickRedirect, false, 99630, new Class[0], Void.TYPE).isSupported) {
            super.onStart();
        }
    }

    public static View v(ShareActivityFragmentDialog shareActivityFragmentDialog, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, shareActivityFragmentDialog, changeQuickRedirect, false, 99632, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
        return proxy.isSupported ? (View) proxy.result : super.onCreateView(layoutInflater, viewGroup, bundle);
    }

    public static void w(ShareActivityFragmentDialog shareActivityFragmentDialog, View view, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{view, bundle}, shareActivityFragmentDialog, changeQuickRedirect, false, 99634, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
            super.onViewCreated(view, bundle);
        }
    }

    public final void A(String str) {
        if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 99600, new Class[]{String.class}, Void.TYPE).isSupported) {
            l30.b.f34999a.e("community_content_share_platform_click", "274", "", new c(this, str, 2));
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.fragment.app.DialogFragment
    public void dismiss() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99597, new Class[0], Void.TYPE).isSupported) {
            super.dismiss();
            this.f12752g.cancel();
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment
    public void g() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99584, new Class[0], Void.TYPE).isSupported) {
            super.g();
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99598, new Class[0], Void.TYPE).isSupported) {
                Window window = getDialog().getWindow();
                window.setDimAmount(i.f36333a);
                WindowManager.LayoutParams attributes = window.getAttributes();
                attributes.width = -1;
                attributes.height = -2;
                attributes.gravity = 48;
                attributes.flags = 32;
                window.setAttributes(attributes);
            }
        }
    }

    @Override // androidx.fragment.app.Fragment
    public void onActivityCreated(@Nullable Bundle bundle) {
        CommunityCreatorModel creator;
        String str;
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 99583, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onActivityCreated(bundle);
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99585, new Class[0], Void.TYPE).isSupported && getArguments() != null) {
                Bundle arguments = getArguments();
                this.e = arguments.getBoolean("allow_auto_dismiss");
                this.f12753h = arguments.getLong("dismiss_duration_key");
                this.i = (CommunityFeedModel) arguments.getParcelable("share_model_key");
                this.f = arguments.getBoolean("first_post_activity_key");
                arguments.getInt("publish_source_page_key");
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99586, new Class[0], Void.TYPE).isSupported) {
                o0.b("community_block_content_exposure", y.d);
                this.k = new GestureDetector(getContext(), this.n);
                this.rootContainer.setOnTouchListener(new n(this, 0));
                CommunityFeedModel communityFeedModel = this.i;
                if (communityFeedModel != null) {
                    if (communityFeedModel.getContent().isVideo()) {
                        Pair<Boolean, String> videoCover = this.i.getContent().getVideoCover();
                        if (videoCover != null) {
                            if (videoCover.getFirst().booleanValue()) {
                                str = eo.b.c(videoCover.getSecond(), 6);
                            } else {
                                str = eo.b.a(videoCover.getSecond(), 6);
                            }
                            this.cover.i(str).p0(DuScaleType.FIT_CENTER).h0(k0.b(R.mipmap.ic_video_play_new)).x();
                        }
                    } else if (!ei.a.c(this.i.getContent().getMediaListModel())) {
                        this.cover.g(eo.b.a(((MediaItemModel) h.a.j(this.i, 0)).getSafeOriginUrl(), 6));
                    }
                    if (!(this.i.getCreator() == null || PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99587, new Class[0], Void.TYPE).isSupported || (creator = this.i.getCreator()) == null)) {
                        LevelInfo levelInfo = creator.getLevelInfo();
                        TaskInfo taskInfo = creator.getTaskInfo();
                        FirstVideoInfo firstVideoPublish = creator.getFirstVideoPublish();
                        if (creator.getCouponInfo() != null && creator.getCouponInfo().isShow()) {
                            CouponInfo couponInfo = creator.getCouponInfo();
                            if (!PatchProxy.proxy(new Object[]{couponInfo}, this, changeQuickRedirect, false, 99589, new Class[]{CouponInfo.class}, Void.TYPE).isSupported && getContext() != null) {
                                this.checkRewardBtn.setText(couponInfo.getBtnText());
                                this.trafficTicketTitle.setText(couponInfo.getTitle());
                                this.trafficTicketText.setText(couponInfo.getDesc());
                                this.trafficTicketIcon.i(couponInfo.getIcon()).j0(requireContext(), R.drawable.du_community_ic_traffic_ticket).x();
                                this.trafficTicketContainer.setVisibility(0);
                                this.trafficTicketContainer.setOnClickListener(new u(this, couponInfo, 1));
                                o0.b("community_block_content_exposure", q.b);
                            }
                        } else if (firstVideoPublish == null || !firstVideoPublish.isShow()) {
                            if (levelInfo == null || !levelInfo.isShow()) {
                                if (taskInfo != null && taskInfo.isShow()) {
                                    if (!PatchProxy.proxy(new Object[]{taskInfo}, this, changeQuickRedirect, false, 99592, new Class[]{TaskInfo.class}, Void.TYPE).isSupported) {
                                        o0.b("community_block_content_exposure", p.b);
                                        this.clTask.setOnClickListener(new ae.n(this, taskInfo, 2));
                                        this.clVideoTask.setVisibility(8);
                                        this.clTask.setVisibility(0);
                                        this.clLevel.setVisibility(8);
                                        if (taskInfo.getProcess() == 1.0f) {
                                            this.ivCompleteState.h(R.drawable.ic_complete).x();
                                            this.tvGetPrice.setText("立即领取");
                                        } else {
                                            this.ivCompleteState.h(R.drawable.ic_unfinish).x();
                                            this.tvGetPrice.setText("去完成");
                                        }
                                        this.tvCompleteState.setText(Html.fromHtml(taskInfo.getTitle()));
                                        if (taskInfo.getReward().isEmpty()) {
                                            this.taskName.setText("做任务解锁曝光机会");
                                        } else {
                                            this.taskName.setText(Html.fromHtml(taskInfo.getReward()));
                                        }
                                    }
                                }
                            } else if (!PatchProxy.proxy(new Object[]{levelInfo}, this, changeQuickRedirect, false, 99591, new Class[]{LevelInfo.class}, Void.TYPE).isSupported) {
                                o0.b("community_block_content_exposure", r.f37218c);
                                this.clLevel.setOnClickListener(new m(this, levelInfo, 2));
                                this.clVideoTask.setVisibility(8);
                                this.clLevel.setVisibility(0);
                                this.clTask.setVisibility(8);
                                if (levelInfo.getUpgradeDesc().isEmpty()) {
                                    this.processDesc.setText("作者成长进度提升啦");
                                } else {
                                    this.processDesc.setText(Html.fromHtml(levelInfo.getUpgradeDesc()), TextView.BufferType.SPANNABLE);
                                }
                                this.levelLeft.setText(levelInfo.getCurrentLevel());
                                this.levelRight.setText(levelInfo.getNextLevel());
                                this.progressBar.setMax(200);
                                if (levelInfo.getGoalProcess() == 0) {
                                    this.progressBar.setProgress(200);
                                } else {
                                    ValueAnimator duration = ValueAnimator.ofInt(0, (levelInfo.getCurrentProcess() * 200) / levelInfo.getGoalProcess()).setDuration(1000L);
                                    this.f12752g = duration;
                                    duration.addUpdateListener(new q20.m(this, 0));
                                    this.f12752g.start();
                                }
                            }
                        } else if (!PatchProxy.proxy(new Object[]{firstVideoPublish}, this, changeQuickRedirect, false, 99593, new Class[]{FirstVideoInfo.class}, Void.TYPE).isSupported) {
                            String jumpUrl = firstVideoPublish.getJumpUrl() != null ? firstVideoPublish.getJumpUrl() : "https://m.poizon.com/router/trend/CreatorCenter";
                            o0.b("community_block_content_exposure", new h(jumpUrl, 1));
                            this.clVideoTask.setVisibility(0);
                            this.clTask.setVisibility(8);
                            this.clLevel.setVisibility(8);
                            this.tvVideoTaskTitle.setText(Html.fromHtml(firstVideoPublish.getDesc()), TextView.BufferType.SPANNABLE);
                            this.tvGo.setOnClickListener(new os.b(this, jumpUrl, 1));
                        }
                    }
                }
                if (this.f) {
                    this.title.setText(R.string.share_activity_first_hint);
                } else {
                    this.title.setText(R.string.share_activity_more_hint);
                }
                u20.a.encryptionUserId(ServiceManager.d().getUserId(), 0, new t(this, getActivity()));
            }
            if (this.i != null) {
                this.j = l.b(getActivity());
            }
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
    public void onCreate(Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 99581, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onCreate(this, bundle);
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, this, changeQuickRedirect, false, 99631, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
        return proxy.isSupported ? (View) proxy.result : _boostWeave.FragmentMethodWeaver_onCreateView(this, layoutInflater, viewGroup, bundle);
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
    public void onResume() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99594, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onResume(this);
        }
    }

    @Override // androidx.fragment.app.Fragment, androidx.fragment.app.DialogFragment
    public void onSaveInstanceState(@NonNull Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 99610, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onSaveInstanceState(new Bundle());
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
    public void onStart() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99629, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onStart(this);
        }
    }

    @Override // androidx.fragment.app.Fragment, androidx.fragment.app.DialogFragment
    public void onStop() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99596, new Class[0], Void.TYPE).isSupported) {
            super.onStop();
            this.cover.removeCallbacks(this.m);
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
    public void onViewCreated(View view, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{view, bundle}, this, changeQuickRedirect, false, 99633, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onViewCreated(this, view, bundle);
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.BaseDialogFragment
    public int q() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99579, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.dialog_share_activity;
    }

    @Override // com.shizhuang.duapp.common.dialog.BaseDialogFragment
    public void r(View view) {
        boolean z = PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 99580, new Class[]{View.class}, Void.TYPE).isSupported;
    }

    @OnClick({6697})
    public void shareIm() {
        CommunityFeedModel communityFeedModel;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99601, new Class[0], Void.TYPE).isSupported && (communityFeedModel = this.i) != null) {
            d30.b.f31309a.q(getContext(), b0.b(communityFeedModel));
            A(SensorCommunitySharePlatform.PERSONAL_LETTER.getType());
        }
    }

    @OnClick({6706})
    public void shareQQ() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99605, new Class[0], Void.TYPE).isSupported && this.i != null) {
            z(SHARE_MEDIA.QQ);
            A(PushConstants.PUSH_TYPE_WITHDRAW_NOTIFICATION);
        }
    }

    @OnClick({6718})
    public void shareWechat() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99602, new Class[0], Void.TYPE).isSupported && this.i != null) {
            z(SHARE_MEDIA.WEIXIN);
            A("1");
        }
    }

    @OnClick({6717})
    public void shareWechatCircle() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99603, new Class[0], Void.TYPE).isSupported && this.i != null) {
            z(SHARE_MEDIA.WEIXIN_CIRCLE);
            A(PushConstants.PUSH_TYPE_UPLOAD_LOG);
        }
    }

    @OnClick({6719})
    public void shareWeibo() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 99604, new Class[0], Void.TYPE).isSupported && this.i != null) {
            z(SHARE_MEDIA.SINA);
            A(PushConstants.PUSH_FLYME_3_CHANGE_VERSION_START);
        }
    }

    public final void x(SHARE_MEDIA share_media) {
        if (!PatchProxy.proxy(new Object[]{share_media}, this, changeQuickRedirect, false, 99607, new Class[]{SHARE_MEDIA.class}, Void.TYPE).isSupported) {
            if (y(share_media)) {
                this.j.c().u(mn.a.f35714a.c(this.j.c().f(), 200, 200, false));
                this.j.c().w(false);
            }
            if (!this.j.c().q() || ei.a.a(this.j.c().f()) || !y(share_media)) {
                this.j.g(share_media);
                return;
            }
            DuRequestOptions G = mn.a.a(this.j.c().f()).G(this);
            G.d = new o(this, share_media);
            G.y();
        }
    }

    public final boolean y(SHARE_MEDIA share_media) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{share_media}, this, changeQuickRedirect, false, 99608, new Class[]{SHARE_MEDIA.class}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        return share_media == SHARE_MEDIA.QQ || share_media == SHARE_MEDIA.WEIXIN;
    }

    public final void z(SHARE_MEDIA share_media) {
        if (!PatchProxy.proxy(new Object[]{share_media}, this, changeQuickRedirect, false, 99606, new Class[]{SHARE_MEDIA.class}, Void.TYPE).isSupported) {
            CommunityFeedModel communityFeedModel = this.i;
            if (communityFeedModel != null && !communityFeedModel.getContent().isSupportShare()) {
                df.q.n("该内容暂不支持分享~");
            } else if (this.j.c() != null) {
                x(share_media);
            } else if (this.l == null) {
                u20.a.encryptionUserId(ServiceManager.d().getUserId(), 0, new b(getActivity(), share_media));
            } else {
                x(share_media);
            }
        }
    }
}