From b4569ec615fd57c3c2f187430911d2275e8ace67 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 7 Sep 2016 20:39:43 +0200 Subject: [PATCH] allow displaying empty folder at changing copy destination --- .../filemanager/dialogs/SelectFolderDialog.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/simplemobiletools/filemanager/dialogs/SelectFolderDialog.java b/app/src/main/java/com/simplemobiletools/filemanager/dialogs/SelectFolderDialog.java index 2fc3fec9..69ad8f13 100644 --- a/app/src/main/java/com/simplemobiletools/filemanager/dialogs/SelectFolderDialog.java +++ b/app/src/main/java/com/simplemobiletools/filemanager/dialogs/SelectFolderDialog.java @@ -28,9 +28,11 @@ public class SelectFolderDialog extends DialogFragment { private static String mPath; private static ListView mListView; private static Breadcrumbs mBreadcrumbs; + private static boolean mFirstUpdate; public static SelectFolderDialog newInstance(String path) { mPath = path; + mFirstUpdate = true; return new SelectFolderDialog(); } @@ -59,7 +61,7 @@ public class SelectFolderDialog extends DialogFragment { private void updateItems() { final List items = getItems(mPath); - if (!containsDirectory(items)) { + if (!containsDirectory(items) && !mFirstUpdate) { sendResult(); return; } @@ -79,6 +81,8 @@ public class SelectFolderDialog extends DialogFragment { } } }); + + mFirstUpdate = false; } private void sendResult() {