mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-02-17 04:10:39 +01:00
get Recents file name from its path, if not filled in
This commit is contained in:
parent
9f15dc39d4
commit
a48300e713
@ -122,7 +122,7 @@ class RecentsFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
|
||||
|
||||
context?.queryCursor(uri, projection, sortOrder = sortOrder, showErrors = true) { cursor ->
|
||||
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 modified = cursor.getLongValue(FileColumns.DATE_MODIFIED) * 1000
|
||||
val fileDirItem = ListItem(path, name, false, 0, size, modified, false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user