get Recents file name from its path, if not filled in
This commit is contained in:
parent
9f15dc39d4
commit
a48300e713
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@ class RecentsFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
|
||||||
|
|
||||||
context?.queryCursor(uri, projection, sortOrder = sortOrder, showErrors = true) { cursor ->
|
context?.queryCursor(uri, projection, sortOrder = sortOrder, showErrors = true) { cursor ->
|
||||||
val path = cursor.getStringValue(FileColumns.DATA)
|
val path = cursor.getStringValue(FileColumns.DATA)
|
||||||
val name = cursor.getStringValue(FileColumns.DISPLAY_NAME)
|
val name = cursor.getStringValue(FileColumns.DISPLAY_NAME) ?: path.getFilenameFromPath()
|
||||||
val size = cursor.getLongValue(FileColumns.SIZE)
|
val size = cursor.getLongValue(FileColumns.SIZE)
|
||||||
val modified = cursor.getLongValue(FileColumns.DATE_MODIFIED) * 1000
|
val modified = cursor.getLongValue(FileColumns.DATE_MODIFIED) * 1000
|
||||||
val fileDirItem = ListItem(path, name, false, 0, size, modified, false)
|
val fileDirItem = ListItem(path, name, false, 0, size, modified, false)
|
||||||
|
|
Loading…
Reference in a new issue