what-the-bank/sources/com/scb/phone/view/fragment/donations/SharingMomentsPreviewFragme...

181 lines
5.7 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.fragment.donations;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.scb.phone.R;
import com.scb.phone.view.activity.BaseActivity;
import com.scb.phone.view.fragment.donations.SharingMomentsPreviewFragment;
import com.squareup.picasso.Picasso;
import java.util.concurrent.Callable;
import o.AbstractC13163fSk;
import o.C0690Mh;
import o.C10896eSC;
import o.C12891fKc;
import o.C13417fZt;
import o.C16903sI;
import o.InterfaceC13391fZD;
import o.InterfaceC8944daR;
import o.JF;
import o.ZI;
import o.aPM;
import o.fRR;
import o.fSQ;
import o.guQ;
import org.jmrtd.lds.ImageInfo;
/* loaded from: classes5.dex */
public class SharingMomentsPreviewFragment extends Hilt_SharingMomentsPreviewFragment implements InterfaceC8944daR {
@BindView
ImageView mSharingImage;
@BindView
ImageView mSharingLogo;
@BindView
TextView mSubText;
@BindView
TextView mTitle;
@InterfaceC13391fZD
public aPM sharingMomentPreviewPresenter;
public static SharingMomentsPreviewFragment c(JF jf) {
Bundle bundle = new Bundle();
bundle.putParcelable("com.scb.phone.EXTRA_SHARING_PREVIEW_DISPLAY", jf);
SharingMomentsPreviewFragment sharingMomentsPreviewFragment = new SharingMomentsPreviewFragment();
sharingMomentsPreviewFragment.setArguments(bundle);
return sharingMomentsPreviewFragment;
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.2131559575, viewGroup, false);
ButterKnife.c(this, inflate);
aa();
this.sharingMomentPreviewPresenter.e((aPM) this);
aPM apm = this.sharingMomentPreviewPresenter;
final JF jf = (JF) getArguments().getParcelable("com.scb.phone.EXTRA_SHARING_PREVIEW_DISPLAY");
ZI.IeS ieS = new ZI.IeS(jf) { // from class: o.aPP
private JF d;
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC8944daR) obj).d(this.d);
}
{
this.d = jf;
}
};
if (apm.f != 0) {
ieS.e(apm.f);
}
return inflate;
}
@Override // o.InterfaceC8944daR
public final void e() {
aPM apm = this.sharingMomentPreviewPresenter;
C0690Mh.IeS ieS = C0690Mh.IeS.NAVIGATE_BACK;
C16903sI c16903sI = apm.j;
apm.d(c16903sI.c((String) null, c16903sI.e(R.string.share_error), ieS));
}
public final void h() {
final JF jf = (JF) getArguments().getParcelable("com.scb.phone.EXTRA_SHARING_PREVIEW_DISPLAY");
final Context context = getContext();
AbstractC13163fSk.fromCallable(new Callable(jf, context) { // from class: o.fLj
private JF a;
private Context d;
@Override // java.util.concurrent.Callable
public final Object call() {
return C12925fLc.aAv_(this.a, this.d);
}
{
this.a = jf;
this.d = context;
}
}).observeOn(fRR.e()).subscribeOn(C13417fZt.b()).subscribe(new fSQ(this) { // from class: o.eSD
private SharingMomentsPreviewFragment d;
@Override // o.fSQ
public final void c(Object obj) {
SharingMomentsPreviewFragment.asb_(this.d, (Uri) obj);
}
{
this.d = this;
}
}, new fSQ(this) { // from class: o.eSG
private SharingMomentsPreviewFragment b;
@Override // o.fSQ
public final void c(Object obj) {
SharingMomentsPreviewFragment.c(this.b);
}
{
this.b = this;
}
});
}
public static void d() {
guQ.b("onPermissionDeniedAndroid13", new Object[0]);
}
public static /* synthetic */ void c(SharingMomentsPreviewFragment sharingMomentsPreviewFragment) {
aPM apm = sharingMomentsPreviewFragment.sharingMomentPreviewPresenter;
ZI.IeS ieS = new ZI.IeS() { // from class: o.aPO
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC8944daR) obj).e();
}
};
if (apm.f != 0) {
ieS.e(apm.f);
}
}
public static /* synthetic */ void asb_(SharingMomentsPreviewFragment sharingMomentsPreviewFragment, Uri uri) {
Intent intent = new Intent("android.intent.action.SEND");
intent.setType(ImageInfo.JPEG_MIME_TYPE);
intent.addFlags(1);
intent.putExtra("android.intent.extra.STREAM", uri);
sharingMomentsPreviewFragment.startActivity(Intent.createChooser(intent, sharingMomentsPreviewFragment.getString(R.string.share)));
}
@Override // o.InterfaceC8944daR
public final void d(JF jf) {
this.mTitle.setText(jf.b);
this.mSubText.setText(jf.c);
Picasso.d().e(jf.a).e(R.drawable.donations_place_holder).aBu_(this.mSharingImage, null);
C12891fKc.aze_(R.drawable.donations_place_holder_logo, this.mSharingLogo, jf.d);
}
@OnClick
public void shareMoment() {
if (getActivity() != null) {
if (BaseActivity.P()) {
C10896eSC.d(this);
return;
}
}
C10896eSC.c(this);
}
}