diff --git a/main/src/main/java/com/yunbao/main/activity/MessageHiConfigActivity.java b/main/src/main/java/com/yunbao/main/activity/MessageHiConfigActivity.java index 8baf0ea28..26dff0e98 100644 --- a/main/src/main/java/com/yunbao/main/activity/MessageHiConfigActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MessageHiConfigActivity.java @@ -315,6 +315,7 @@ public class MessageHiConfigActivity extends AbsActivity { private void setImage(View view) { MessageHiBean bean = (MessageHiBean) view.getTag(); if (bean == null) { + ViewUtils.findViewById(view, R.id.img_close).setVisibility(View.GONE); ViewUtils.findViewById(view, R.id.img_img, ImageView.class).setImageResource(R.mipmap.ic_message_hi_config_image_add); view.setOnClickListener(v -> { uploadImage(view); @@ -342,12 +343,11 @@ public class MessageHiConfigActivity extends AbsActivity { onSuccessToUrl(file, new OnItemClickListener() { @Override public void onItemClick(String url, int position) { + loading.dismiss(); if (position == -1) { - loading.dismiss(); ToastUtil.show("连接超时"); return; } - loading.dismiss(); MessageHiBean item = new MessageHiBean(); item.setContent(url); item.setType(MessageHiBean.TYPE_IMAGE); @@ -361,7 +361,7 @@ public class MessageHiConfigActivity extends AbsActivity { @Override public void onFailure() { super.onFailure(); - if(loading!=null){ + if (loading != null) { loading.dismiss(); } }