File tree 1 file changed +4
-1
lines changed
library/src/main/java/com/rain/library/ui
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -145,13 +145,15 @@ public void onClick(View v) {
145
145
}
146
146
String path = photos .get (pos ).getOriginalImagePath ();
147
147
if (selectPhotos .contains (path )) {
148
+ selectPhotosInfo .remove (photos .get (pos ));
148
149
selectPhotos .remove (path );
149
150
checkbox .setChecked (false );
150
151
} else {
151
152
if (maxPickSize == selectPhotos .size ()) {
152
153
checkbox .setChecked (false );
153
154
return ;
154
155
}
156
+ selectPhotosInfo .add (photos .get (pos ));
155
157
selectPhotos .add (path );
156
158
checkbox .setChecked (true );
157
159
}
@@ -229,7 +231,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
229
231
public void onSuccess (File file ) {
230
232
if (file .exists ()) {
231
233
Rlog .e ("Rain" , "Luban compression success:" + file .getAbsolutePath () + " ; image length = " + file .length ());
232
- selectPhotosInfo .get (imageFilePath .size ()).setCompressionImagePath (file .getAbsolutePath ());
234
+ Photo photo = selectPhotosInfo .get (imageFilePath .size ());
235
+ photo .setCompressionImagePath (file .getAbsolutePath ());
233
236
imageFilePath .add (file .getAbsolutePath ());
234
237
if (imageFilePath != null && imageFilePath .size () > 0 && imageFilePath .size () == selectPhotos .size ()) {
235
238
Rlog .e ("Rain" , "all select image compression success!" );
You can’t perform that action at this time.
0 commit comments