remove a redundant variable
This commit is contained in:
parent
d0e81a3410
commit
3d6329766a
|
@ -8,6 +8,7 @@ import com.simplemobiletools.filepicker.extensions.scanFiles
|
|||
import com.simplemobiletools.gallery.R
|
||||
import com.simplemobiletools.gallery.extensions.getHumanizedFilename
|
||||
import com.simplemobiletools.gallery.extensions.getLongValue
|
||||
import com.simplemobiletools.gallery.extensions.getStringValue
|
||||
import com.simplemobiletools.gallery.helpers.Config
|
||||
import com.simplemobiletools.gallery.helpers.SORT_BY_NAME
|
||||
import com.simplemobiletools.gallery.helpers.SORT_DESCENDING
|
||||
|
@ -46,9 +47,8 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
|
|||
cursor = context.contentResolver.query(uri, columns, null, null, order)
|
||||
|
||||
if (cursor?.moveToFirst() == true) {
|
||||
val pathIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATA)
|
||||
do {
|
||||
val fullPath = cursor.getString(pathIndex) ?: continue
|
||||
val fullPath = cursor.getStringValue(MediaStore.Images.Media.DATA) ?: continue
|
||||
val file = File(fullPath)
|
||||
val size = cursor.getLongValue(MediaStore.Images.Media.SIZE)
|
||||
|
||||
|
|
|
@ -46,9 +46,8 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickVideo
|
|||
cursor = context.contentResolver.query(uri, columns, where, args, null)
|
||||
|
||||
if (cursor?.moveToFirst() == true) {
|
||||
val pathIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATA)
|
||||
do {
|
||||
val curPath = cursor.getString(pathIndex) ?: continue
|
||||
val curPath = cursor.getStringValue(MediaStore.Images.Media.DATA) ?: continue
|
||||
if (!mToBeDeleted.contains(curPath)) {
|
||||
val file = File(curPath)
|
||||
val size = cursor.getLongValue(MediaStore.Images.Media.SIZE)
|
||||
|
|
Loading…
Reference in New Issue