mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 12:38:00 +01:00
refresh only the images which were deleted
This commit is contained in:
parent
a242fb783d
commit
5e845c694c
1 changed files with 5 additions and 2 deletions
|
@ -149,12 +149,15 @@ public class PhotosActivity extends AppCompatActivity
|
||||||
Helpers.showToast(this, R.string.deleting);
|
Helpers.showToast(this, R.string.deleting);
|
||||||
final SparseBooleanArray items = gridView.getCheckedItemPositions();
|
final SparseBooleanArray items = gridView.getCheckedItemPositions();
|
||||||
int cnt = items.size();
|
int cnt = items.size();
|
||||||
|
final String[] deletedPaths = new String[cnt];
|
||||||
for (int i = 0; i < cnt; i++) {
|
for (int i = 0; i < cnt; i++) {
|
||||||
final int id = items.keyAt(i);
|
final int id = items.keyAt(i);
|
||||||
toBeDeleted.add(photos.get(id));
|
final String path = photos.get(id);
|
||||||
|
toBeDeleted.add(path);
|
||||||
|
deletedPaths[i] = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
MediaScannerConnection.scanFile(this, new String[]{path}, null, this);
|
MediaScannerConnection.scanFile(this, deletedPaths, null, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void notifyDeletion(int cnt) {
|
private void notifyDeletion(int cnt) {
|
||||||
|
|
Loading…
Reference in a new issue