From dd8d54bd4fcf90752e6a66f2d9b40d04f478afd0 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 16 Apr 2018 12:43:29 +0200 Subject: [PATCH] show the content of empty folders instantly --- .../simplemobiletools/filemanager/helpers/RootHelpers.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/helpers/RootHelpers.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/helpers/RootHelpers.kt index 888898e5..6c5116d0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/helpers/RootHelpers.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/helpers/RootHelpers.kt @@ -42,7 +42,12 @@ class RootHelpers { } override fun commandCompleted(id: Int, exitcode: Int) { - getChildrenCount(activity, files, path, callback) + if (files.isEmpty()) { + callback(path, files) + } else { + getChildrenCount(activity, files, path, callback) + } + super.commandCompleted(id, exitcode) } }