导航菜单

页面标题

页面副标题

BetterTogether v3.0.0 - ImagePreviewActivity.java 源代码

正在查看: BetterTogether v3.0.0 应用的 ImagePreviewActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.bettertogether.screens.chat.preview;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import ce.a;
import com.bettertogether.screens.chat.preview.ImagePreviewActivity;
import com.bumptech.glide.l;
import com.github.chrisbanes.photoview.PhotoView;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import dd.s;
import ee.b;
import fs.d;
import h.o;
import java.io.File;
import java.io.Serializable;
import java.util.Arrays;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import lq.m;
import lq.n;
import lq.x;

@Metadata
public final class ImagePreviewActivity extends o {

    public static final int f4976i = 0;

    public final m f4977d = n.a(lq.o.f13215d, new s(this, 8));

    public final x f4978e = n.b(new a(this, 1));

    public final void attachBaseContext(Context context) {
        super.attachBaseContext(context);
        d.D(this, context);
    }

    public final void onCreate(Bundle bundle) {
        super/*androidx.fragment.app.e0*/.onCreate(bundle);
        setContentView(t().f4323a);
        Serializable serializableExtra = getIntent().getSerializableExtra("param_mode");
        Intrinsics.f(serializableExtra, "null cannot be cast to non-null type com.bettertogether.screens.chat.preview.ImagePreviewActivity.Mode");
        int ordinal = ((b) serializableExtra).ordinal();
        m mVar = this.f4977d;
        final int i10 = 0;
        if (ordinal == 0) {
            t().f4324b.setOnClickListener(new View.OnClickListener(this) {

                public final ImagePreviewActivity f7127e;

                {
                    this.f7127e = this;
                }

                @Override
                public final void onClick(View view) {
                    int i11 = i10;
                    o oVar = this.f7127e;
                    switch (i11) {
                        case 0:
                            int i12 = ImagePreviewActivity.f4976i;
                            Intrinsics.checkNotNullParameter(oVar, "this$0");
                            oVar.finish();
                            break;
                        case 1:
                            int i13 = ImagePreviewActivity.f4976i;
                            Intrinsics.checkNotNullParameter(oVar, "this$0");
                            oVar.setResult(0);
                            oVar.finish();
                            break;
                        default:
                            int i14 = ImagePreviewActivity.f4976i;
                            Intrinsics.checkNotNullParameter(oVar, "this$0");
                            oVar.setResult(-1);
                            oVar.finish();
                            break;
                    }
                }
            });
            String stringExtra = getIntent().getStringExtra("param_image_url");
            if (stringExtra != null) {
                bg.b bVar = (bg.b) mVar.getValue();
                PhotoView photoView = t().f4326d;
                Intrinsics.checkNotNullExpressionValue(photoView, "binding.ivPreviewImage");
                mg.o[] oVarArr = new mg.o[0];
                bVar.getClass();
                Intrinsics.checkNotNullParameter(this, "context");
                Intrinsics.checkNotNullParameter(photoView, "target");
                Intrinsics.checkNotNullParameter(oVarArr, "transformations");
                ((l) com.bumptech.glide.b.c(this).f(this).n(stringExtra).t((mg.o[]) Arrays.copyOf(oVarArr, 0))).A(photoView);
                return;
            }
            return;
        }
        final int i11 = 1;
        if (ordinal != 1) {
            return;
        }
        t().f4324b.setOnClickListener(new View.OnClickListener(this) {

            public final ImagePreviewActivity f7127e;

            {
                this.f7127e = this;
            }

            @Override
            public final void onClick(View view) {
                int i112 = i11;
                o oVar = this.f7127e;
                switch (i112) {
                    case 0:
                        int i12 = ImagePreviewActivity.f4976i;
                        Intrinsics.checkNotNullParameter(oVar, "this$0");
                        oVar.finish();
                        break;
                    case 1:
                        int i13 = ImagePreviewActivity.f4976i;
                        Intrinsics.checkNotNullParameter(oVar, "this$0");
                        oVar.setResult(0);
                        oVar.finish();
                        break;
                    default:
                        int i14 = ImagePreviewActivity.f4976i;
                        Intrinsics.checkNotNullParameter(oVar, "this$0");
                        oVar.setResult(-1);
                        oVar.finish();
                        break;
                }
            }
        });
        Serializable serializableExtra2 = getIntent().getSerializableExtra("param_image_file");
        Intrinsics.f(serializableExtra2, "null cannot be cast to non-null type java.io.File");
        bg.b bVar2 = (bg.b) mVar.getValue();
        PhotoView photoView2 = t().f4326d;
        Intrinsics.checkNotNullExpressionValue(photoView2, "binding.ivPreviewImage");
        bVar2.getClass();
        bg.b.e(this, (File) serializableExtra2, photoView2, false);
        FloatingActionButton floatingActionButton = t().f4325c;
        Intrinsics.checkNotNullExpressionValue(floatingActionButton, "setupSendMode$lambda$2");
        d.x(floatingActionButton);
        final int i12 = 2;
        floatingActionButton.setOnClickListener(new View.OnClickListener(this) {

            public final ImagePreviewActivity f7127e;

            {
                this.f7127e = this;
            }

            @Override
            public final void onClick(View view) {
                int i112 = i12;
                o oVar = this.f7127e;
                switch (i112) {
                    case 0:
                        int i122 = ImagePreviewActivity.f4976i;
                        Intrinsics.checkNotNullParameter(oVar, "this$0");
                        oVar.finish();
                        break;
                    case 1:
                        int i13 = ImagePreviewActivity.f4976i;
                        Intrinsics.checkNotNullParameter(oVar, "this$0");
                        oVar.setResult(0);
                        oVar.finish();
                        break;
                    default:
                        int i14 = ImagePreviewActivity.f4976i;
                        Intrinsics.checkNotNullParameter(oVar, "this$0");
                        oVar.setResult(-1);
                        oVar.finish();
                        break;
                }
            }
        });
    }

    public final cd.n t() {
        return (cd.n) this.f4978e.getValue();
    }
}