do not try closing the media fetching cursor twice

This commit is contained in:
tibbi 2017-05-26 09:26:20 +02:00
parent 8e5f72f59b
commit e53d6a5c20

View file

@ -69,7 +69,6 @@ private fun parseCursor(context: Context, cur: Cursor, isPickImage: Boolean, isP
val showMedia = config.showMedia val showMedia = config.showMedia
val showHidden = config.shouldShowHidden val showHidden = config.shouldShowHidden
cur.use { cur ->
if (cur.moveToFirst()) { if (cur.moveToFirst()) {
var filename: String var filename: String
var path: String var path: String
@ -143,7 +142,6 @@ private fun parseCursor(context: Context, cur: Cursor, isPickImage: Boolean, isP
} }
} while (cur.moveToNext()) } while (cur.moveToNext())
} }
}
Medium.sorting = config.getFileSorting(curPath) Medium.sorting = config.getFileSorting(curPath)
curMedia.sort() curMedia.sort()