瀏覽代碼

修复朋友圈拍照崩溃

Junqin Wang 8 年之前
父節點
當前提交
19139e3156

+ 1 - 0
app/app.iml

@@ -87,6 +87,7 @@
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/multi-dex" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard-rules" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />

+ 6 - 1
app/src/com/sheishuo/app/core_module/circle/activity/NewTweetingActivity.java

@@ -164,7 +164,9 @@ public class NewTweetingActivity extends SheishuoUI {
             if (!result.getBoolean("from_local")) {
                 //照相机
                 String filePath = result.getString("file_path");
+                //移除添加图片按钮
                 imgsLayout.removeAllViews();
+
                 ImageView imageView = new ImageView(this);
                 imageView.setAdjustViewBounds(true);
                 int toDp = (int) ImgUtil.convertDpToPixel(128, context);
@@ -173,10 +175,14 @@ public class NewTweetingActivity extends SheishuoUI {
                         .centerCrop()
                         .bitmapTransform(new ColorFilterTransformation(context, 0x7900CCCC))
                         .into(imageView);
+                selectedPhotoPathList.add(filePath);
                 presenter.uploadPhoto(filePath);
             } else {
                 //相册
+
+                //移除添加图片按钮
                 imgsLayout.removeAllViews();
+
                 List<PhotoInfo> photoInfoList = (List<PhotoInfo>) result.getSerializable("photo_list");
                 for (PhotoInfo info : photoInfoList) {
                     ImageView imageView = new ImageView(this);
@@ -200,7 +206,6 @@ public class NewTweetingActivity extends SheishuoUI {
     @Override
     protected void onDestroy() {
         super.onDestroy();
-//        activity.onActivityResult(0,CircleOfFriendsFragment.REFRESH_CIRCLE,null);
     }
 
     /**

+ 1 - 1
app/src/com/sheishuo/app/core_module/circle/model/NewTweetModel.java

@@ -52,8 +52,8 @@ public class NewTweetModel {
                         @Override
                         public void onSuccess(Object object) {
                             //Log.e("object", (String) object);
-                            presenter.onOnePhotoUploaded(index,(int)object);
                             presenter.showToast("第" + (finalI + 1) + "张照片上传完毕");
+                            presenter.onOnePhotoUploaded(index,(int)object);
                         }
 
                         @Override

+ 0 - 3
app/src/com/sheishuo/app/core_module/recent_contacts/activity/ContactsListActivity.java

@@ -3,13 +3,10 @@ package com.sheishuo.app.core_module.recent_contacts.activity;
 import android.os.Bundle;
 import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentTransaction;
-import android.view.View;
 import android.widget.LinearLayout;
 
 import com.netease.nim.uikit.contact.ContactsFragment;
 import com.sheishuo.app.R;
-import com.sheishuo.app.main.fragment.ContactListFragment;
-import com.sheishuo.app.main.fragment.SessionListFragment;
 import com.sheishuo.app.uikit_implements.SheishuoUI;
 
 /**