Skip to content

Commit b4569ec

Browse files
committed
allow displaying empty folder at changing copy destination
1 parent 176828a commit b4569ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/src/main/java/com/simplemobiletools/filemanager/dialogs/SelectFolderDialog.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ public class SelectFolderDialog extends DialogFragment {
2828
private static String mPath;
2929
private static ListView mListView;
3030
private static Breadcrumbs mBreadcrumbs;
31+
private static boolean mFirstUpdate;
3132

3233
public static SelectFolderDialog newInstance(String path) {
3334
mPath = path;
35+
mFirstUpdate = true;
3436
return new SelectFolderDialog();
3537
}
3638

@@ -59,7 +61,7 @@ public void onClick(DialogInterface dialog, int which) {
5961

6062
private void updateItems() {
6163
final List<FileDirItem> items = getItems(mPath);
62-
if (!containsDirectory(items)) {
64+
if (!containsDirectory(items) && !mFirstUpdate) {
6365
sendResult();
6466
return;
6567
}
@@ -79,6 +81,8 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
7981
}
8082
}
8183
});
84+
85+
mFirstUpdate = false;
8286
}
8387

8488
private void sendResult() {

0 commit comments

Comments
 (0)