@@ -49,7 +49,7 @@ android { |
||
49 | 49 |
zipAlignEnabled false |
50 | 50 |
minifyEnabled false |
51 | 51 |
shrinkResources false |
52 |
- buildConfigField "boolean", "isTestMode", "false" |
|
52 |
+ buildConfigField "boolean", "isTestMode", "true" |
|
53 | 53 |
signingConfig signingConfigs.releaseConfig |
54 | 54 |
} |
55 | 55 |
} |
@@ -130,7 +130,7 @@ public class DBService { |
||
130 | 130 |
db = dbHelper.getReadableDatabase(); |
131 | 131 |
db.beginTransaction(); |
132 | 132 |
db.execSQL("delete from " + DBHelper.PHOTO_INFO_TABLE + " where " |
133 |
- + DBHelper.PHOTO_INFO_COLUMNS.PHOTO_PATH + " = '" + bean.photoPath + "'"); |
|
133 |
+ + DBHelper.PHOTO_INFO_COLUMNS.PHOTO_ID + " = '" + bean.photoId + "'"); |
|
134 | 134 |
db.setTransactionSuccessful(); |
135 | 135 |
} catch (Exception e) { |
136 | 136 |
LogHelper.d(TAG, "dbservice deleteUploadPhoto error happen " + e); |
@@ -45,6 +45,8 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie |
||
45 | 45 |
final float alpha = 1 - Math.abs(dX) / (float)viewHolder.itemView.getWidth(); |
46 | 46 |
viewHolder.itemView.setAlpha(alpha); |
47 | 47 |
viewHolder.itemView.setTranslationX(dX); |
48 |
+ viewHolder.itemView.setScaleX(alpha); |
|
49 |
+ viewHolder.itemView.setScaleY(alpha); |
|
48 | 50 |
} |
49 | 51 |
} |
50 | 52 |
|
@@ -97,7 +99,6 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie |
||
97 | 99 |
|
98 | 100 |
@OnClick(R.id.iv_qrcode) |
99 | 101 |
void showQRCodeForSession(){ |
100 |
-// new SessionQRPopup(this, sessionBean.sessionId,this).showPopupWindow(); |
|
101 | 102 |
Intent intent = new Intent(this,PrinterSettingActivity.class); |
102 | 103 |
intent.putExtra("qrcode", UrlContainer.HOST_URL+sessionBean.sessionId); |
103 | 104 |
startActivity(intent); |
@@ -5,6 +5,7 @@ import android.content.Intent; |
||
5 | 5 |
import java.util.ArrayList; |
6 | 6 |
|
7 | 7 |
import ai.pai.lensman.App; |
8 |
+import ai.pai.lensman.BuildConfig; |
|
8 | 9 |
import ai.pai.lensman.bean.PhotoBean; |
9 | 10 |
import ai.pai.lensman.bean.SessionBean; |
10 | 11 |
import ai.pai.lensman.db.DBService; |
@@ -67,6 +68,11 @@ public class SessionPresenter implements SessionContract.Presenter, SessionInter |
||
67 | 68 |
if (!isWorking) { |
68 | 69 |
return; |
69 | 70 |
} |
71 |
+ if(BuildConfig.isTestMode){ |
|
72 |
+ if(photoList!=null && photoList.size()>5){ |
|
73 |
+ return; |
|
74 |
+ } |
|
75 |
+ } |
|
70 | 76 |
DBService.getInstance().addPhotoBean(bean); |
71 | 77 |
sessionView.showPhotoRecyclerView(); |
72 | 78 |
sessionView.addNewPhoto(bean); |
@@ -80,6 +86,9 @@ public class SessionPresenter implements SessionContract.Presenter, SessionInter |
||
80 | 86 |
|
81 | 87 |
@Override |
82 | 88 |
public void swipeToDeletePhoto(int index) { |
89 |
+ if(index<0 || index>= photoList.size()){ |
|
90 |
+ return; |
|
91 |
+ } |
|
83 | 92 |
PhotoBean photoBean = photoList.get(index); |
84 | 93 |
photoList.remove(photoBean); |
85 | 94 |
DBService.getInstance().deletePhotoBean(photoBean); |