580 lines
23 KiB
Java
580 lines
23 KiB
Java
package com.ubt.jimu.user.setting.view;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.content.DialogInterface;
|
|
import android.content.Intent;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.os.Bundle;
|
|
import android.text.TextUtils;
|
|
import android.view.View;
|
|
import android.widget.EditText;
|
|
import android.widget.ImageView;
|
|
import android.widget.RelativeLayout;
|
|
import android.widget.TextView;
|
|
import androidx.fragment.app.FragmentActivity;
|
|
import androidx.recyclerview.widget.GridLayoutManager;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import com.bumptech.glide.Glide;
|
|
import com.bumptech.glide.RequestBuilder;
|
|
import com.bumptech.glide.request.RequestOptions;
|
|
import com.jakewharton.rxbinding2.view.RxView;
|
|
import com.ubt.jimu.JimuApplication;
|
|
import com.ubt.jimu.R;
|
|
import com.ubt.jimu.base.cache.Cache;
|
|
import com.ubt.jimu.base.dialog.JimuSimpleDialog;
|
|
import com.ubt.jimu.base.entities.FeedbackEntities;
|
|
import com.ubt.jimu.base.entities.User;
|
|
import com.ubt.jimu.base.event.SelectPackEvent;
|
|
import com.ubt.jimu.base.mvp.BaseMvpFragment;
|
|
import com.ubt.jimu.community.presenter.PublishCommunityPresenter;
|
|
import com.ubt.jimu.main.utils.CardActionUtils;
|
|
import com.ubt.jimu.picture.PictureShowActivity;
|
|
import com.ubt.jimu.upload.DataUploadProxy;
|
|
import com.ubt.jimu.upload.UploadRequest;
|
|
import com.ubt.jimu.upload.UploadResponse;
|
|
import com.ubt.jimu.user.feedback.FeedBackIconAdapter;
|
|
import com.ubt.jimu.user.feedback.FeedBackIconBean;
|
|
import com.ubt.jimu.user.feedback.FeedbackPostBean;
|
|
import com.ubt.jimu.user.feedback.IFBOperateImg;
|
|
import com.ubt.jimu.user.feedback.PostMediaBean;
|
|
import com.ubt.jimu.user.setting.view.FeedBackFragment;
|
|
import com.ubt.jimu.user.setting.view.FeedBackPresenter;
|
|
import com.ubt.jimu.user.view.LoginActivity;
|
|
import com.ubt.jimu.utils.LocaleUtils;
|
|
import com.ubt.jimu.widgets.FeedBackTypeLayout;
|
|
import com.ubt.jimu.widgets.UploadPopupWindow;
|
|
import com.ubt.jimu.widgets.choosePhotos.media.HPMedia;
|
|
import com.ubt.jimu.widgets.player.UbtPlayer;
|
|
import com.ubtech.utils.StringUtils;
|
|
import com.ubtech.view.widget.ToastView;
|
|
import com.ubtech.view.widget.UButton;
|
|
import com.ubtrobot.log.ALog;
|
|
import io.reactivex.Observable;
|
|
import io.reactivex.ObservableEmitter;
|
|
import io.reactivex.ObservableOnSubscribe;
|
|
import io.reactivex.functions.Consumer;
|
|
import io.reactivex.schedulers.Schedulers;
|
|
import java.io.File;
|
|
import java.util.ArrayList;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.Objects;
|
|
import java.util.concurrent.TimeUnit;
|
|
import org.greenrobot.eventbus.EventBus;
|
|
import org.greenrobot.eventbus.Subscribe;
|
|
import org.greenrobot.eventbus.ThreadMode;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class FeedBackFragment extends BaseMvpFragment<FeedBackPresenter> implements FeedBackPresenter.FeedBackView {
|
|
private String a = "sales";
|
|
private FeedBackTypeLayout b;
|
|
private TextView c;
|
|
private ImageView d;
|
|
private TextView e;
|
|
private EditText f;
|
|
private RelativeLayout g;
|
|
private EditText h;
|
|
private UButton i;
|
|
private RelativeLayout j;
|
|
private RelativeLayout k;
|
|
private TextView l;
|
|
private RecyclerView m;
|
|
private FeedBackIconAdapter n;
|
|
private ArrayList<FeedBackIconBean> o;
|
|
private UploadPopupWindow p;
|
|
private long q;
|
|
|
|
/* renamed from: com.ubt.jimu.user.setting.view.FeedBackFragment$1, reason: invalid class name */
|
|
class AnonymousClass1 implements PublishCommunityPresenter.CompressionProgressListener {
|
|
AnonymousClass1() {
|
|
}
|
|
|
|
@Override // com.ubt.jimu.community.presenter.PublishCommunityPresenter.CompressionProgressListener
|
|
public void U() {
|
|
((FragmentActivity) Objects.requireNonNull(FeedBackFragment.this.getActivity())).runOnUiThread(new Runnable() { // from class: com.ubt.jimu.user.setting.view.l
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
FeedBackFragment.AnonymousClass1.this.b();
|
|
}
|
|
});
|
|
}
|
|
|
|
public /* synthetic */ void a(int i) {
|
|
FeedBackFragment.this.p.b(i);
|
|
}
|
|
|
|
public /* synthetic */ void b() {
|
|
FeedBackFragment.this.p.a(FeedBackFragment.this.getResources().getString(R.string.compressing_video));
|
|
}
|
|
|
|
@Override // com.ubt.jimu.community.presenter.PublishCommunityPresenter.CompressionProgressListener
|
|
public void c(boolean z) {
|
|
ALog.a("FeedBackFragment").d("视频压缩失败:");
|
|
}
|
|
|
|
@Override // com.ubt.jimu.community.presenter.PublishCommunityPresenter.CompressionProgressListener
|
|
public void d(final int i) {
|
|
((FragmentActivity) Objects.requireNonNull(FeedBackFragment.this.getActivity())).runOnUiThread(new Runnable() { // from class: com.ubt.jimu.user.setting.view.n
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
FeedBackFragment.AnonymousClass1.this.a(i);
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // com.ubt.jimu.community.presenter.PublishCommunityPresenter.CompressionProgressListener
|
|
public void m() {
|
|
ALog.a("FeedBackFragment").d("视频压缩完成");
|
|
((FragmentActivity) Objects.requireNonNull(FeedBackFragment.this.getActivity())).runOnUiThread(new Runnable() { // from class: com.ubt.jimu.user.setting.view.o
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
FeedBackFragment.AnonymousClass1.this.a();
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // com.ubt.jimu.community.presenter.PublishCommunityPresenter.CompressionProgressListener
|
|
public void onAllCompressFail() {
|
|
ALog.a("FeedBackFragment").d("视频压缩全部失败");
|
|
FeedBackFragment.this.p.a(FeedBackFragment.this.rootView, UploadPopupWindow.UploadState.UPLOAD_FAILURE);
|
|
}
|
|
|
|
@Override // com.ubt.jimu.community.presenter.PublishCommunityPresenter.CompressionProgressListener
|
|
public void a(int i, String str) {
|
|
FeedBackIconBean feedBackIconBean = ((FeedBackPresenter) FeedBackFragment.this.mPresenter).c().getmMediaList().get(i);
|
|
File file = new File(str);
|
|
if (file.exists()) {
|
|
feedBackIconBean.setPath(str);
|
|
feedBackIconBean.setmName(file.getName());
|
|
}
|
|
}
|
|
|
|
public /* synthetic */ void a() {
|
|
FeedBackFragment.this.p.a(FeedBackFragment.this.getResources().getString(R.string.uploading));
|
|
FeedBackFragment.this.p.b(0);
|
|
Observable.create(new ObservableOnSubscribe() { // from class: com.ubt.jimu.user.setting.view.m
|
|
@Override // io.reactivex.ObservableOnSubscribe
|
|
public final void subscribe(ObservableEmitter observableEmitter) {
|
|
FeedBackFragment.AnonymousClass1.this.a(observableEmitter);
|
|
}
|
|
}).subscribeOn(Schedulers.b()).subscribe();
|
|
}
|
|
|
|
public /* synthetic */ void a(ObservableEmitter observableEmitter) throws Exception {
|
|
FeedBackFragment feedBackFragment = FeedBackFragment.this;
|
|
((FeedBackPresenter) feedBackFragment.mPresenter).c(feedBackFragment.o);
|
|
}
|
|
}
|
|
|
|
@SuppressLint({"CheckResult"})
|
|
private void A() {
|
|
((FeedBackPresenter) this.mPresenter).a(new AnonymousClass1());
|
|
RxView.a(this.i).throttleFirst(500L, TimeUnit.MILLISECONDS).subscribe(new Consumer() { // from class: com.ubt.jimu.user.setting.view.t
|
|
@Override // io.reactivex.functions.Consumer
|
|
public final void accept(Object obj) {
|
|
FeedBackFragment.this.a(obj);
|
|
}
|
|
});
|
|
RxView.a(this.l).throttleFirst(500L, TimeUnit.MILLISECONDS).subscribe(new Consumer() { // from class: com.ubt.jimu.user.setting.view.u
|
|
@Override // io.reactivex.functions.Consumer
|
|
public final void accept(Object obj) {
|
|
FeedBackFragment.this.b(obj);
|
|
}
|
|
});
|
|
this.b.setiSelectCallBack(new FeedBackTypeLayout.ISelectCallBack() { // from class: com.ubt.jimu.user.setting.view.FeedBackFragment.2
|
|
@Override // com.ubt.jimu.widgets.FeedBackTypeLayout.ISelectCallBack
|
|
public void a() {
|
|
FeedBackFragment.this.a = "sales";
|
|
}
|
|
|
|
@Override // com.ubt.jimu.widgets.FeedBackTypeLayout.ISelectCallBack
|
|
public void b() {
|
|
FeedBackFragment.this.a = "product";
|
|
}
|
|
});
|
|
this.g.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.setting.view.p
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
FeedBackFragment.this.a(view);
|
|
}
|
|
});
|
|
}
|
|
|
|
private void B() {
|
|
this.b.a();
|
|
x();
|
|
}
|
|
|
|
private void C() {
|
|
this.p = new UploadPopupWindow(getActivity());
|
|
this.p.a(new UploadPopupWindow.OnClickListener() { // from class: com.ubt.jimu.user.setting.view.FeedBackFragment.3
|
|
@Override // com.ubt.jimu.widgets.UploadPopupWindow.OnClickListener
|
|
public void G() {
|
|
}
|
|
|
|
@Override // com.ubt.jimu.widgets.UploadPopupWindow.OnClickListener
|
|
public void O() {
|
|
FeedBackFragment.this.b();
|
|
}
|
|
|
|
@Override // com.ubt.jimu.widgets.UploadPopupWindow.OnClickListener
|
|
public void R() {
|
|
}
|
|
|
|
@Override // com.ubt.jimu.widgets.UploadPopupWindow.OnClickListener
|
|
public void e0() {
|
|
}
|
|
});
|
|
this.p.a(this.rootView, UploadPopupWindow.UploadState.UPLOADING_PROGRESS);
|
|
}
|
|
|
|
private void D() {
|
|
String trim = this.f.getText().toString().trim();
|
|
if (LocaleUtils.f()) {
|
|
if (StringUtils.e(trim) || (!StringUtils.d(trim) && !StringUtils.a((CharSequence) trim))) {
|
|
ToastView.a(JimuApplication.k, getString(R.string.feedback_contact_toast_error), ToastView.Type.ERROR).a();
|
|
return;
|
|
}
|
|
} else if (StringUtils.e(trim) || !StringUtils.d(trim)) {
|
|
ToastView.a(JimuApplication.k, getString(R.string.error_email_format), ToastView.Type.ERROR).a();
|
|
return;
|
|
}
|
|
String trim2 = this.h.getText().toString().trim();
|
|
if (StringUtils.e(trim2) || trim2.length() < 10) {
|
|
ToastView.a(JimuApplication.k, getString(R.string.feedback_content_toast_error), ToastView.Type.ERROR).a();
|
|
return;
|
|
}
|
|
if (Cache.getInstance().getUser() == null) {
|
|
new JimuSimpleDialog.Builder(getActivity()).cancel(R.string.i_got_it).ok(R.string.now_login).content(R.string.setting_feedback_loginnow).onCancel(new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.setting.view.v
|
|
@Override // android.content.DialogInterface.OnClickListener
|
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
|
dialogInterface.dismiss();
|
|
}
|
|
}).onOk(new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.setting.view.y
|
|
@Override // android.content.DialogInterface.OnClickListener
|
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
|
FeedBackFragment.this.a(dialogInterface, i);
|
|
}
|
|
}).build().show();
|
|
return;
|
|
}
|
|
((FeedBackPresenter) this.mPresenter).a(this.f.getText().toString().trim(), this.h.getText().toString().trim(), this.a, this.q);
|
|
if (this.o.size() > 0) {
|
|
F();
|
|
} else {
|
|
((FeedBackPresenter) this.mPresenter).b(this.o);
|
|
}
|
|
}
|
|
|
|
private void E() {
|
|
this.k.setVisibility(8);
|
|
this.j.setVisibility(0);
|
|
}
|
|
|
|
private void F() {
|
|
JimuSimpleDialog.showWifiOnlyDialog(getActivity(), new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.setting.view.x
|
|
@Override // android.content.DialogInterface.OnClickListener
|
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
|
FeedBackFragment.d(dialogInterface, i);
|
|
}
|
|
}, new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.setting.view.w
|
|
@Override // android.content.DialogInterface.OnClickListener
|
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
|
FeedBackFragment.this.b(dialogInterface, i);
|
|
}
|
|
}, false);
|
|
}
|
|
|
|
private void H() {
|
|
((FeedBackPresenter) this.mPresenter).b();
|
|
this.o.clear();
|
|
this.k.setVisibility(0);
|
|
this.j.setVisibility(8);
|
|
}
|
|
|
|
static /* synthetic */ void d(DialogInterface dialogInterface, int i) {
|
|
}
|
|
|
|
private void initView(View view) {
|
|
this.b = (FeedBackTypeLayout) view.findViewById(R.id.feedback_type);
|
|
this.f = (EditText) view.findViewById(R.id.et_email);
|
|
this.h = (EditText) view.findViewById(R.id.et_feedback);
|
|
this.i = (UButton) view.findViewById(R.id.xl_send);
|
|
this.g = (RelativeLayout) view.findViewById(R.id.card_external);
|
|
this.c = (TextView) view.findViewById(R.id.external_name);
|
|
this.d = (ImageView) view.findViewById(R.id.external_icon);
|
|
this.e = (TextView) view.findViewById(R.id.contact_desc);
|
|
this.m = (RecyclerView) view.findViewById(R.id.icon_list);
|
|
this.j = (RelativeLayout) view.findViewById(R.id.container);
|
|
this.k = (RelativeLayout) view.findViewById(R.id.success_view);
|
|
this.l = (TextView) view.findViewById(R.id.feedback_complete_sure);
|
|
B();
|
|
A();
|
|
y();
|
|
}
|
|
|
|
private void x() {
|
|
String packageImagePath = Cache.getInstance().getPackageImagePath();
|
|
if (TextUtils.isEmpty(packageImagePath)) {
|
|
this.c.setText(getResources().getString(R.string.feedback_external_default));
|
|
this.d.setVisibility(8);
|
|
this.c.setVisibility(0);
|
|
} else {
|
|
this.d.setVisibility(0);
|
|
this.c.setVisibility(8);
|
|
this.q = Cache.getInstance().getPackageId();
|
|
RequestBuilder<Drawable> a = Glide.e(JimuApplication.l()).a(packageImagePath);
|
|
a.a(new RequestOptions().b(R.drawable.image_load_error).a(R.drawable.image_load_error).b());
|
|
a.a(this.d);
|
|
}
|
|
}
|
|
|
|
private void y() {
|
|
this.o = new ArrayList<>();
|
|
this.n = new FeedBackIconAdapter(getActivity());
|
|
((FeedBackPresenter) this.mPresenter).a(new FeedBackPresenter.IChooseImg() { // from class: com.ubt.jimu.user.setting.view.r
|
|
@Override // com.ubt.jimu.user.setting.view.FeedBackPresenter.IChooseImg
|
|
public final void a(List list) {
|
|
FeedBackFragment.this.h(list);
|
|
}
|
|
});
|
|
this.m.setLayoutManager(new GridLayoutManager(getActivity(), 3));
|
|
this.n.a(new IFBOperateImg() { // from class: com.ubt.jimu.user.setting.view.FeedBackFragment.4
|
|
@Override // com.ubt.jimu.user.feedback.IFBOperateImg
|
|
public void a() {
|
|
FeedBackFragment feedBackFragment = FeedBackFragment.this;
|
|
((FeedBackPresenter) feedBackFragment.mPresenter).a(feedBackFragment.getActivity());
|
|
}
|
|
|
|
@Override // com.ubt.jimu.user.feedback.IFBOperateImg
|
|
public void b(FeedBackIconBean feedBackIconBean) {
|
|
PictureShowActivity.start(FeedBackFragment.this.getActivity(), "", feedBackIconBean.getPath());
|
|
}
|
|
|
|
@Override // com.ubt.jimu.user.feedback.IFBOperateImg
|
|
public void a(int i) {
|
|
FeedBackFragment.this.o.remove(i);
|
|
((FeedBackPresenter) FeedBackFragment.this.mPresenter).a(i);
|
|
FeedBackFragment.this.n.a(FeedBackFragment.this.o);
|
|
}
|
|
|
|
@Override // com.ubt.jimu.user.feedback.IFBOperateImg
|
|
public void a(FeedBackIconBean feedBackIconBean) {
|
|
UbtPlayer.a(FeedBackFragment.this.getActivity(), "", feedBackIconBean.getPath());
|
|
}
|
|
});
|
|
this.m.setAdapter(this.n);
|
|
this.n.a((List<FeedBackIconBean>) null);
|
|
}
|
|
|
|
@Override // com.ubt.jimu.user.setting.view.FeedBackPresenter.FeedBackView
|
|
public void allUploadSucceed() {
|
|
((FragmentActivity) Objects.requireNonNull(getActivity())).runOnUiThread(new Runnable() { // from class: com.ubt.jimu.user.setting.view.q
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
FeedBackFragment.this.q();
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // com.ubt.jimu.user.setting.view.FeedBackPresenter.FeedBackView
|
|
public void g() {
|
|
UploadPopupWindow uploadPopupWindow = this.p;
|
|
if (uploadPopupWindow != null && uploadPopupWindow.c()) {
|
|
this.p.a();
|
|
}
|
|
ToastView.a(JimuApplication.k, getString(R.string.failed_to_send_feedback), ToastView.Type.SUCCESS).a();
|
|
}
|
|
|
|
@Override // com.ubt.jimu.base.mvp.BaseMvpFragment
|
|
public int getLayoutID() {
|
|
return R.layout.fragment_feedback;
|
|
}
|
|
|
|
public /* synthetic */ void h(List list) {
|
|
this.o.clear();
|
|
Iterator it = list.iterator();
|
|
while (it.hasNext()) {
|
|
HPMedia hPMedia = (HPMedia) it.next();
|
|
this.o.add(new FeedBackIconBean(false, hPMedia.getPath(), hPMedia.getMediaType(), hPMedia.getDisplayName()));
|
|
}
|
|
this.n.a(this.o);
|
|
}
|
|
|
|
@Override // com.ubt.jimu.user.setting.view.FeedBackPresenter.FeedBackView
|
|
public void k() {
|
|
((FragmentActivity) Objects.requireNonNull(getActivity())).runOnUiThread(new Runnable() { // from class: com.ubt.jimu.user.setting.view.k
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
FeedBackFragment.this.v();
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // com.ubt.jimu.user.setting.view.FeedBackPresenter.FeedBackView
|
|
public void n() {
|
|
C();
|
|
}
|
|
|
|
protected void o() {
|
|
User user;
|
|
EditText editText;
|
|
if (LocaleUtils.f()) {
|
|
this.e.setText(getResources().getString(R.string.feedback_contact_way));
|
|
this.f.setHint(getResources().getString(R.string.feedback_contact_hint));
|
|
} else {
|
|
this.e.setText(getResources().getString(R.string.email));
|
|
this.f.setHint(getResources().getString(R.string.setting_input_email));
|
|
}
|
|
String userId = Cache.getInstance().getUserId();
|
|
if (TextUtils.isEmpty(userId) || userId.equals("local") || (user = Cache.getInstance().getUser()) == null) {
|
|
return;
|
|
}
|
|
String email = user.getEmail();
|
|
String phone = user.getPhone();
|
|
if (!TextUtils.isEmpty(phone)) {
|
|
this.f.setText(phone);
|
|
} else {
|
|
if (TextUtils.isEmpty(email) || (editText = this.f) == null) {
|
|
return;
|
|
}
|
|
editText.setText(email);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public void onActivityResult(int i, int i2, Intent intent) {
|
|
super.onActivityResult(i, i2, intent);
|
|
((FeedBackPresenter) this.mPresenter).a(i, i2, intent);
|
|
}
|
|
|
|
@Override // com.ubt.jimu.base.mvp.BaseMvpFragment, androidx.fragment.app.Fragment
|
|
public void onDestroy() {
|
|
super.onDestroy();
|
|
if (EventBus.b().a(this)) {
|
|
EventBus.b().d(this);
|
|
}
|
|
}
|
|
|
|
@Override // com.ubt.jimu.base.mvp.BaseMvpFragment, androidx.fragment.app.Fragment
|
|
public void onResume() {
|
|
super.onResume();
|
|
o();
|
|
}
|
|
|
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
public void onSelectExternal(SelectPackEvent selectPackEvent) {
|
|
this.q = selectPackEvent.getPackId();
|
|
if (TextUtils.isEmpty(selectPackEvent.getPacketImgPath())) {
|
|
this.d.setVisibility(8);
|
|
this.c.setVisibility(0);
|
|
return;
|
|
}
|
|
this.d.setVisibility(0);
|
|
this.c.setVisibility(8);
|
|
RequestBuilder<Drawable> a = Glide.e(JimuApplication.l()).a(selectPackEvent.getPacketImgPath());
|
|
a.a(new RequestOptions().b(R.drawable.image_load_error).a(R.drawable.image_load_error).b());
|
|
a.a(this.d);
|
|
}
|
|
|
|
@Override // com.ubt.jimu.base.mvp.BaseMvpFragment, androidx.fragment.app.Fragment
|
|
public void onViewCreated(View view, Bundle bundle) {
|
|
super.onViewCreated(view, bundle);
|
|
if (!EventBus.b().a(this)) {
|
|
EventBus.b().c(this);
|
|
}
|
|
initView(view);
|
|
}
|
|
|
|
public /* synthetic */ void q() {
|
|
UploadPopupWindow uploadPopupWindow = this.p;
|
|
if (uploadPopupWindow == null || !uploadPopupWindow.c()) {
|
|
return;
|
|
}
|
|
this.p.a();
|
|
}
|
|
|
|
public /* synthetic */ void v() {
|
|
this.p.a(105);
|
|
this.p.a(getResources().getString(R.string.uploading));
|
|
}
|
|
|
|
public /* synthetic */ void b(Object obj) throws Exception {
|
|
this.h.setText("");
|
|
E();
|
|
this.n.a((List<FeedBackIconBean>) null);
|
|
}
|
|
|
|
@Override // com.ubt.jimu.base.mvp.BaseMvpFragment
|
|
public FeedBackPresenter createPresenter() {
|
|
return new FeedBackPresenter(getActivity(), this);
|
|
}
|
|
|
|
public /* synthetic */ void a(Object obj) throws Exception {
|
|
D();
|
|
}
|
|
|
|
public /* synthetic */ void a(View view) {
|
|
CardActionUtils.a(getActivity(), 9, this.q);
|
|
}
|
|
|
|
@Override // com.ubt.jimu.user.setting.view.FeedBackPresenter.FeedBackView
|
|
public void a(FeedbackEntities feedbackEntities) {
|
|
if (feedbackEntities.isStatus()) {
|
|
ToastView.a(JimuApplication.k, getString(R.string.feedback_success), ToastView.Type.SUCCESS).a();
|
|
H();
|
|
} else {
|
|
ToastView.a(JimuApplication.k, getString(R.string.failed_to_send_feedback), ToastView.Type.SUCCESS).a();
|
|
}
|
|
}
|
|
|
|
public /* synthetic */ void b(DialogInterface dialogInterface, int i) {
|
|
((FeedBackPresenter) this.mPresenter).b(this.o);
|
|
}
|
|
|
|
public void b() {
|
|
((FeedBackPresenter) this.mPresenter).a();
|
|
DataUploadProxy.c().a();
|
|
}
|
|
|
|
@Override // com.ubt.jimu.user.setting.view.FeedBackPresenter.FeedBackView
|
|
public void a(int i) {
|
|
this.p.a(i);
|
|
}
|
|
|
|
public /* synthetic */ void a(DialogInterface dialogInterface, int i) {
|
|
dialogInterface.dismiss();
|
|
LoginActivity.start(getActivity());
|
|
}
|
|
|
|
public /* synthetic */ void a(double d) {
|
|
this.p.b((int) (d * 100.0d));
|
|
}
|
|
|
|
@Override // com.ubt.jimu.user.setting.view.FeedBackPresenter.FeedBackView
|
|
public void a(UploadRequest uploadRequest, final double d) {
|
|
((FragmentActivity) Objects.requireNonNull(getActivity())).runOnUiThread(new Runnable() { // from class: com.ubt.jimu.user.setting.view.s
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
FeedBackFragment.this.a(d);
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // com.ubt.jimu.user.setting.view.FeedBackPresenter.FeedBackView
|
|
public void a(UploadResponse uploadResponse) {
|
|
if (uploadResponse == null) {
|
|
return;
|
|
}
|
|
FeedbackPostBean c = ((FeedBackPresenter) this.mPresenter).c();
|
|
List<PostMediaBean> imageList = c.getImageList();
|
|
if (imageList == null) {
|
|
imageList = new ArrayList<>();
|
|
c.setImageList(imageList);
|
|
}
|
|
if (imageList != null) {
|
|
imageList.add(new PostMediaBean(uploadResponse.a(), uploadResponse.c()));
|
|
}
|
|
}
|
|
}
|