mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
get Recents file name from its path, if not filled in
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user