diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt index 319c2008d..b865104ae 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt @@ -603,7 +603,7 @@ class DirectoryAdapter( val paths = getSelectedPaths() val fileDirItems = ArrayList(paths.size) paths.forEach { - val fileDirItem = FileDirItem(it, it.getFilenameFromPath(), activity.getIsPathDirectory(it)) + val fileDirItem = File(it).toFileDirItem(activity) fileDirItems.add(fileDirItem) } val size = fileDirItems.sumByLong { it.getProperSize(activity, countHidden = true) }.formatSize() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt index 7d4ca81ca..f71192bda 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt @@ -471,7 +471,7 @@ class MediaAdapter( val paths = getSelectedPaths() val fileDirItems = ArrayList(paths.size) paths.forEach { - val fileDirItem = FileDirItem(it, it.getFilenameFromPath(), activity.getIsPathDirectory(it)) + val fileDirItem = File(it).toFileDirItem(activity) fileDirItems.add(fileDirItem) } val size = fileDirItems.sumByLong { it.getProperSize(activity, countHidden = true) }.formatSize()