Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f

以下内容为反编译后的 DeleteProfileSuccessFragment.java 源代码,内容仅作参考


package by.kufar.settings.ui.deleteprofile;

import am.d;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.SpannableStringBuilder;
import android.text.TextPaint;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.text.style.ForegroundColorSpan;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.FragmentActivity;
import androidx.graphics.OnBackPressedCallback;
import androidx.graphics.OnBackPressedDispatcher;
import androidx.graphics.OnBackPressedDispatcherKt;
import by.kufar.core.android.fragment.BaseFragment;
import by.kufar.re.ui.widget.webview.WebViewActivity;
import by.kufar.settings.R$color;
import by.kufar.settings.R$id;
import by.kufar.settings.R$layout;
import by.kufar.settings.R$string;
import db.w;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.g0;
import kotlin.jvm.internal.o0;
import kotlin.jvm.internal.s;
import kotlin.jvm.internal.u;
import kotlin.reflect.KProperty;

@Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\t\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b#\u0010$J\b\u0010\u0003\u001a\u00020\u0002H\u0002J\b\u0010\u0004\u001a\u00020\u0002H\u0002J\b\u0010\u0005\u001a\u00020\u0002H\u0002J\b\u0010\u0006\u001a\u00020\u0002H\u0016J&\u0010\u000e\u001a\u0004\u0018\u00010\r2\u0006\u0010\b\u001a\u00020\u00072\b\u0010\n\u001a\u0004\u0018\u00010\t2\b\u0010\f\u001a\u0004\u0018\u00010\u000bH\u0016J\u001a\u0010\u0010\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\r2\b\u0010\f\u001a\u0004\u0018\u00010\u000bH\u0016R\u001b\u0010\u0016\u001a\u00020\u00118BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0012\u0010\u0013\u001a\u0004\b\u0014\u0010\u0015R\u001b\u0010\u001b\u001a\u00020\u00178BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0018\u0010\u0013\u001a\u0004\b\u0019\u0010\u001aR\"\u0010\u001d\u001a\u00020\u001c8\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b\u001d\u0010\u001e\u001a\u0004\b\u001f\u0010 \"\u0004\b!\u0010\"¨\u0006%"}, d2 = {"Lby/kufar/settings/ui/deleteprofile/DeleteProfileSuccessFragment;", "Lby/kufar/core/android/fragment/BaseFragment;", "", "setUpText", "setUpActions", "openListing", "onInject", "Landroid/view/LayoutInflater;", "inflater", "Landroid/view/ViewGroup;", "container", "Landroid/os/Bundle;", "savedInstanceState", "Landroid/view/View;", "onCreateView", "view", "onViewCreated", "Landroid/widget/Button;", "understand$delegate", "Li6/c;", "getUnderstand", "()Landroid/widget/Button;", "understand", "Landroid/widget/TextView;", "subtitle$delegate", "getSubtitle", "()Landroid/widget/TextView;", "subtitle", "Lcb/b;", "mediator", "Lcb/b;", "getMediator", "()Lcb/b;", "setMediator", "(Lcb/b;)V", "<init>", "()V", "feature-settings_googleRelease"}, k = 1, mv = {1, 9, 0})
public final class DeleteProfileSuccessFragment extends BaseFragment {
    static final KProperty<Object>[] $$delegatedProperties = {o0.i(new g0(DeleteProfileSuccessFragment.class, "understand", "getUnderstand()Landroid/widget/Button;", 0)), o0.i(new g0(DeleteProfileSuccessFragment.class, "subtitle", "getSubtitle()Landroid/widget/TextView;", 0))};
    public cb.b mediator;

    private final i6.c understand = bindView(R$id.f16717c0);

    private final i6.c subtitle = bindView(R$id.X);

    @Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\n¢\u0006\u0002\b\u0003"}, d2 = {"<anonymous>", "", "Landroidx/activity/OnBackPressedCallback;", "invoke"}, k = 3, mv = {1, 9, 0}, xi = 48)
    public static final class a extends u implements Function1<OnBackPressedCallback, Unit> {
        public a() {
            super(1);
        }

        @Override
        public Unit invoke(OnBackPressedCallback onBackPressedCallback) {
            invoke2(onBackPressedCallback);
            return Unit.f82492a;
        }

        public final void invoke2(OnBackPressedCallback addCallback) {
            s.j(addCallback, "$this$addCallback");
            DeleteProfileSuccessFragment.this.openListing();
        }
    }

    @Metadata(d1 = {"\u0000\u001d\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0016J\u0010\u0010\b\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u0006H\u0016¨\u0006\t"}, d2 = {"by/kufar/settings/ui/deleteprofile/DeleteProfileSuccessFragment$b", "Landroid/text/style/ClickableSpan;", "Landroid/text/TextPaint;", "ds", "", "updateDrawState", "Landroid/view/View;", "widget", "onClick", "core-android_googleRelease"}, k = 1, mv = {1, 9, 0})
    public static final class b extends ClickableSpan {

        public final Integer f17094b;

        public final boolean f17095c;

        public final DeleteProfileSuccessFragment f17096d;

        public b(Integer num, boolean z11, DeleteProfileSuccessFragment deleteProfileSuccessFragment) {
            this.f17094b = num;
            this.f17095c = z11;
            this.f17096d = deleteProfileSuccessFragment;
        }

        @Override
        public void onClick(View widget) {
            s.j(widget, "widget");
            Context context = this.f17096d.getContext();
            if (context != null) {
                s.g(context);
                this.f17096d.startActivity(WebViewActivity.Companion.b(WebViewActivity.INSTANCE, context, "https://support.kufar.by/hc/ru", false, null, false, false, 60, null));
            }
        }

        @Override
        public void updateDrawState(TextPaint ds2) {
            s.j(ds2, "ds");
            Integer num = this.f17094b;
            if (num != null) {
                ds2.setColor(num.intValue());
            }
            ds2.setUnderlineText(this.f17095c);
        }
    }

    private final TextView getSubtitle() {
        return (TextView) this.subtitle.getValue(this, $$delegatedProperties[1]);
    }

    private final Button getUnderstand() {
        return (Button) this.understand.getValue(this, $$delegatedProperties[0]);
    }

    public final void openListing() {
        Context context = getContext();
        if (context == null) {
            return;
        }
        Intent a11 = w.a.a(getMediator().D(), context, null, null, 6, null);
        a11.setFlags(32768);
        startActivity(a11);
    }

    private final void setUpActions() {
        OnBackPressedDispatcher onBackPressedDispatcher;
        getUnderstand().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                DeleteProfileSuccessFragment.setUpActions$lambda$3(DeleteProfileSuccessFragment.this, view);
            }
        });
        FragmentActivity activity = getActivity();
        if (activity != null && (onBackPressedDispatcher = activity.getOnBackPressedDispatcher()) != null) {
            OnBackPressedDispatcherKt.addCallback$default(onBackPressedDispatcher, null, false, new a(), 3, null);
        }
    }

    public static final void setUpActions$lambda$3(DeleteProfileSuccessFragment this$0, View view) {
        s.j(this$0, "this$0");
        this$0.openListing();
    }

    private final void setUpText() {
        int i11;
        getSubtitle().setMovementMethod(LinkMovementMethod.getInstance());
        TextView subtitle = getSubtitle();
        SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(getString(R$string.f16820u));
        Context context = getContext();
        if (context != null) {
            i11 = ContextCompat.getColor(context, R$color.f16688b);
        } else {
            i11 = -16711936;
        }
        ForegroundColorSpan foregroundColorSpan = new ForegroundColorSpan(i11);
        int length = spannableStringBuilder.length();
        b bVar = new b(null, false, this);
        int length2 = spannableStringBuilder.length();
        spannableStringBuilder.append((CharSequence) (" " + getString(R$string.f16818t)));
        spannableStringBuilder.setSpan(bVar, length2, spannableStringBuilder.length(), 17);
        spannableStringBuilder.setSpan(foregroundColorSpan, length, spannableStringBuilder.length(), 17);
        subtitle.setText(spannableStringBuilder);
    }

    public final cb.b getMediator() {
        cb.b bVar = this.mediator;
        if (bVar != null) {
            return bVar;
        }
        s.B("mediator");
        return null;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        s.j(inflater, "inflater");
        return inflater.inflate(R$layout.f16750i, container, false);
    }

    @Override
    public void onInject() {
        super.onInject();
        d.a a11 = am.b.a();
        Object obj = m5.a.d(this).get(am.e.class);
        if (obj != null) {
            a11.a((am.e) obj).f(this);
            return;
        }
        throw new NullPointerException("null cannot be cast to non-null type by.kufar.settings.di.SettingsFeatureDependencies");
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        s.j(view, "view");
        super.onViewCreated(view, savedInstanceState);
        setUpActions();
        setUpText();
    }

    public final void setMediator(cb.b bVar) {
        s.j(bVar, "<set-?>");
        this.mediator = bVar;
    }
}