From 411c732fa805510bd460f786dba4b7ab59d5f929 Mon Sep 17 00:00:00 2001 From: fatih ergin Date: Wed, 21 Jun 2023 23:56:35 +0300 Subject: [PATCH] remove useless function definition for copy path existency --- .../gallery/pro/dialogs/PickDirectoryDialog.kt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt index 2e2c9c910..d94bf155f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt @@ -183,15 +183,11 @@ class PickDirectoryDialog( private fun getOtherFolderOpeningPath(): String { val lastCopyPath = config.lastCopyPath - val lastCopyPathExist = { - activity.getDoesFilePathExist(lastCopyPath) - } - val lastCopyPathVisible = { showHidden || !lastCopyPath.split(File.separator).any { it.startsWith(".") && it.length > 1 } } - return if (lastCopyPathExist() && lastCopyPathVisible()) { + return if (activity.getDoesFilePathExist(lastCopyPath) && lastCopyPathVisible()) { lastCopyPath } else { sourcePath