From 04e3ea1fb23108decf05aaa072c7f1332f3c4c68 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 13 Nov 2016 11:45:43 +0100 Subject: [PATCH] use the extension function for checking root folders --- app/src/main/kotlin/com/simplemobiletools/gallery/Utils.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/Utils.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/Utils.kt index afa291954..2b9d746d7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/Utils.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/Utils.kt @@ -111,10 +111,7 @@ class Utils { } } - fun isAStorageRootFolder(context: Context, path: String): Boolean { - val trimmed = path.trimEnd('/') - return trimmed.isEmpty() || trimmed == context.getInternalStoragePath() || trimmed == context.getSDCardPath() - } + fun isAStorageRootFolder(context: Context, path: String) = context.isAStorageRootFolder(path) fun isPhotoVideo(file: File) = file.isPhotoVideo()