diff --git a/app/src/main/java/sushi/hardcore/droidfs/file_viewers/FileViewerActivity.kt b/app/src/main/java/sushi/hardcore/droidfs/file_viewers/FileViewerActivity.kt index 4522a77..60d74f9 100644 --- a/app/src/main/java/sushi/hardcore/droidfs/file_viewers/FileViewerActivity.kt +++ b/app/src/main/java/sushi/hardcore/droidfs/file_viewers/FileViewerActivity.kt @@ -137,7 +137,11 @@ abstract class FileViewerActivity: BaseActivity() { return } withContext(Dispatchers.IO) { - encryptedVolume.recursiveMapFiles(originalParentPath)?.filterTo(playlist) { e -> + if (sharedPrefs.getBoolean("map_folders", true)) { + encryptedVolume.recursiveMapFiles(originalParentPath) + } else { + encryptedVolume.readDir(originalParentPath) + }?.filterTo(playlist) { e -> e.isRegularFile && (FileTypes.isExtensionType(getFileType(), e.name) || filePath == e.fullPath) } val sortOrder = intent.getStringExtra("sortOrder") ?: "name"