mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-02-16 20:00:36 +01:00
allow displaying empty folder at changing copy destination
This commit is contained in:
parent
176828a61b
commit
b4569ec615
@ -28,9 +28,11 @@ public class SelectFolderDialog extends DialogFragment {
|
|||||||
private static String mPath;
|
private static String mPath;
|
||||||
private static ListView mListView;
|
private static ListView mListView;
|
||||||
private static Breadcrumbs mBreadcrumbs;
|
private static Breadcrumbs mBreadcrumbs;
|
||||||
|
private static boolean mFirstUpdate;
|
||||||
|
|
||||||
public static SelectFolderDialog newInstance(String path) {
|
public static SelectFolderDialog newInstance(String path) {
|
||||||
mPath = path;
|
mPath = path;
|
||||||
|
mFirstUpdate = true;
|
||||||
return new SelectFolderDialog();
|
return new SelectFolderDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +61,7 @@ public class SelectFolderDialog extends DialogFragment {
|
|||||||
|
|
||||||
private void updateItems() {
|
private void updateItems() {
|
||||||
final List<FileDirItem> items = getItems(mPath);
|
final List<FileDirItem> items = getItems(mPath);
|
||||||
if (!containsDirectory(items)) {
|
if (!containsDirectory(items) && !mFirstUpdate) {
|
||||||
sendResult();
|
sendResult();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -79,6 +81,8 @@ public class SelectFolderDialog extends DialogFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mFirstUpdate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendResult() {
|
private void sendResult() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user