635
         params.put("photo_id", currentPhotoItem.photoId);
529 636
         params.put("user_id", Preferences.getInstance(this).getUserId());
530
-//        params.put("total_fee",String.valueOf(feeInteger));
531
-        params.put("total_fee","1");
637
+        params.put("total_fee",String.valueOf(feeInteger));
638
+//        params.put("total_fee","1");
532 639
         params.put("body",getString(R.string.order_body_buy_from,currentPhotoItem.uploaderName));
533 640
         params.put("trade_type","APP");
534 641
         params.put("photo_type",type);
@@ -588,7 +695,7 @@ public class PhotoDetailsActivity extends BaseActivity implements View.OnClickLi
588 695
         if (getPhotoOrderInfoTask != null && getPhotoOrderInfoTask.getStatus() == AsyncTask.Status.RUNNING) {
589 696
             getPhotoOrderInfoTask.cancel(true);
590 697
         }
591
-        HashMap<String, String> params = new HashMap<String, String>();
698
+        HashMap<String, String> params = new HashMap<>();
592 699
         params.put("user_id", Preferences.getInstance(this).getUserId());
593 700
         params.put("photo_id", currentPhotoItem.photoId);
594 701
         getPhotoOrderInfoTask = new HttpPostTask(this, params) {
@@ -602,11 +709,10 @@ public class PhotoDetailsActivity extends BaseActivity implements View.OnClickLi
602 709
                         JSONObject data = json.getJSONObject("data");
603 710
                         JSONObject porder = data.getJSONObject("porder");
604 711
                         if(porder.has("r_photo_url")){
605
-                            String rPhotoUrl = JSONParseUtils.getJSONString(porder.getString("r_photo_url"));
606
-                            currentPhotoItem.rawPhotoUrl = rPhotoUrl;                        }
712
+                            currentPhotoItem.rawPhotoUrl = JSONParseUtils.getJSONString(porder.getString("r_photo_url"));
713
+                        }
607 714
                         if(porder.has("m_photo_url")){
608
-                            String mPhotoUrl = JSONParseUtils.getJSONString(porder.getString("m_photo_url"));
609
-                            currentPhotoItem.mediumPhotoUrl = mPhotoUrl;
715
+                            currentPhotoItem.mediumPhotoUrl = JSONParseUtils.getJSONString(porder.getString("m_photo_url"));
610 716
                         }
611 717
                         return true;
612 718
                     }
@@ -653,7 +759,7 @@ public class PhotoDetailsActivity extends BaseActivity implements View.OnClickLi
653 759
         if (getPriceTask != null && getPriceTask.getStatus() == AsyncTask.Status.RUNNING) {
654 760
             getPriceTask.cancel(true);
655 761
         }
656
-        HashMap<String, String> params = new HashMap<String, String>();
762
+        HashMap<String, String> params = new HashMap<>();
657 763
         params.put("photo_id", currentPhotoItem.photoId);
658 764
         params.put("user_id", Preferences.getInstance(this).getUserId());
659 765
         params.put("photo_type",type);
@@ -706,7 +812,7 @@ public class PhotoDetailsActivity extends BaseActivity implements View.OnClickLi
706 812
         if (fetchCommentListTask != null && fetchCommentListTask.getStatus() == AsyncTask.Status.RUNNING) {
707 813
             fetchCommentListTask.cancel(true);
708 814
         }
709
-        HashMap<String, String> params = new HashMap<String, String>();
815
+        HashMap<String, String> params = new HashMap<>();
710 816
         params.put("user_id", Preferences.getInstance(this).getUserId());
711 817
         params.put("group_id", currentPhotoItem.groupId);
712 818
         params.put("photo_id", currentPhotoItem.photoId);
@@ -726,7 +832,7 @@ public class PhotoDetailsActivity extends BaseActivity implements View.OnClickLi
726 832
                         JSONArray commentArray = info.getJSONArray("comments");
727 833
                         if (commentArray != null && commentArray.length() > 0) {
728 834
                             int len = commentArray.length();
729
-                            commentsList = new ArrayList<CommentBean>();
835
+                            commentsList = new ArrayList<>();
730 836
                             for (int k = 0; k < len; k++) {
731 837
                                 JSONObject obj = commentArray.getJSONObject(k);
732 838
                                 CommentBean bean = new CommentBean();
@@ -773,7 +879,7 @@ public class PhotoDetailsActivity extends BaseActivity implements View.OnClickLi
773 879
         if (fetchThumbUpListTask != null && fetchThumbUpListTask.getStatus() == AsyncTask.Status.RUNNING) {
774 880
             fetchThumbUpListTask.cancel(true);
775 881
         }
776
-        HashMap<String, String> params = new HashMap<String, String>();
882
+        HashMap<String, String> params = new HashMap<>();
777 883
         params.put("user_id", Preferences.getInstance(this).getUserId());
778 884
         params.put("group_id", currentPhotoItem.groupId);
779 885
         params.put("photo_id", currentPhotoItem.photoId);
@@ -790,7 +896,7 @@ public class PhotoDetailsActivity extends BaseActivity implements View.OnClickLi
790 896
                     if (status == 200) {
791 897
                         LogHelper.d(TAG, " fetchThumbUpListTask parseResponse status ok");
792 898
                         JSONObject info = json.getJSONObject("data");
793
-                        thumbupList = new ArrayList<CommentBean>();
899
+                        thumbupList = new ArrayList<>();
794 900
                         JSONArray commentArray = info.getJSONArray("thumbups");
795 901
                         if (commentArray != null && commentArray.length() > 0) {
796 902
                             int len = commentArray.length();
@@ -858,7 +964,7 @@ public class PhotoDetailsActivity extends BaseActivity implements View.OnClickLi
858 964
         if (submitThumbUpTask != null && submitThumbUpTask.getStatus() == AsyncTask.Status.RUNNING) {
859 965
             submitThumbUpTask.cancel(true);
860 966
         }
861
-        HashMap<String, String> params = new HashMap<String, String>();
967
+        HashMap<String, String> params = new HashMap<>();
862 968
         params.put("user_id", Preferences.getInstance(this).getUserId());
863 969
         params.put("group_id", currentPhotoItem.groupId);
864 970
         params.put("photo_id", currentPhotoItem.photoId);
@@ -910,7 +1016,7 @@ public class PhotoDetailsActivity extends BaseActivity implements View.OnClickLi
910 1016
         if (submitCommentTask != null && submitCommentTask.getStatus() == AsyncTask.Status.RUNNING) {
911 1017
             submitCommentTask.cancel(true);
912 1018
         }
913
-        HashMap<String, String> params = new HashMap<String, String>();
1019
+        HashMap<String, String> params = new HashMap<>();
914 1020
         params.put("user_id", Preferences.getInstance(this).getUserId());
915 1021
         params.put("group_id", currentPhotoItem.groupId);
916 1022
         params.put("photo_id", currentPhotoItem.photoId);

+ 6 - 0
app/src/main/java/ai/pai/client/adapter/DetailPhotoPageAdapter.java

@@ -117,4 +117,10 @@ public class DetailPhotoPageAdapter extends PagerAdapter {
117 117
     public Parcelable saveState() {
118 118
         return null;
119 119
     }
120
+
121
+    public void addPhotos(ArrayList<GroupPhotoItem> photoItems){
122
+        photoList.addAll(photoItems);
123
+        notifyDataSetChanged();
124
+    }
125
+
120 126
 }

+ 3 - 3
app/src/main/java/ai/pai/client/adapter/PhotoStaggeredAdapter.java

@@ -108,13 +108,13 @@ public class PhotoStaggeredAdapter extends RecyclerView.Adapter<PhotoStaggeredAd
108 108
             public void onClick(View v) {
109 109
                 Intent intent = new Intent(context, PhotoDetailsActivity.class);
110 110
                 ArrayList<GroupPhotoItem> groupPhotoList = new ArrayList<>();
111
-                if(photoList.size()<200){
111
+                if(photoList.size()<300){
112 112
                     groupPhotoList.addAll(photoList);
113 113
                 }else{
114 114
                     if(position>10){
115
-                        groupPhotoList.addAll(photoList.subList(position-9,position+190>photoList.size()?photoList.size():position+190));
115
+                        groupPhotoList.addAll(photoList.subList(position-9,position+290>photoList.size()?photoList.size():position+290));
116 116
                     }else{
117
-                        groupPhotoList.addAll(photoList.subList(0,200));
117
+                        groupPhotoList.addAll(photoList.subList(0,300));
118 118
                     }
119 119
                 }
120 120
                 intent.putExtra("photo_item",item);

+ 0 - 1
app/src/main/java/ai/pai/client/fragments/GroupPhotoFragment.java

@@ -1,6 +1,5 @@
1 1
 package ai.pai.client.fragments;
2 2
 
3
-import android.app.Activity;
4 3
 import android.content.ComponentName;
5 4
 import android.content.Context;
6 5
 import android.content.Intent;

Kodo/kodo - Gogs: Go Git Service

2 Ревизии (e2bc74bfde3d4807be13385dc59b34b15288bbe9)

Автор SHA1 Съобщение Дата
  Brightcells fabef63211 set line_length=200 for isort преди 9 години
  Brightcells 8b7c49ddb9 add app to add page user_agreement/contact_us преди 9 години