mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +01:00
do not try closing the media fetching cursor twice
This commit is contained in:
parent
8e5f72f59b
commit
e53d6a5c20
1 changed files with 64 additions and 66 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue