mirror of https://github.com/M66B/FairEmail.git
Small improvement
This commit is contained in:
parent
000804e772
commit
fb8c3c2582
|
@ -541,7 +541,7 @@ public class FragmentDialogFolder extends FragmentDialogBase {
|
||||||
});
|
});
|
||||||
|
|
||||||
List<String> result = new ArrayList<>();
|
List<String> result = new ArrayList<>();
|
||||||
result.add("");
|
result.add("-");
|
||||||
for (EntityFolder folder : folders)
|
for (EntityFolder folder : folders)
|
||||||
result.add(folder.name);
|
result.add(folder.name);
|
||||||
|
|
||||||
|
@ -565,7 +565,9 @@ public class FragmentDialogFolder extends FragmentDialogBase {
|
||||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
String parent = (String) spParent.getSelectedItem();
|
String parent = (spParent.getSelectedItemPosition() == 0
|
||||||
|
? null
|
||||||
|
: (String) spParent.getSelectedItem());
|
||||||
String name = etName.getText().toString().trim();
|
String name = etName.getText().toString().trim();
|
||||||
if (TextUtils.isEmpty(name))
|
if (TextUtils.isEmpty(name))
|
||||||
sendResult(RESULT_CANCELED);
|
sendResult(RESULT_CANCELED);
|
||||||
|
|
Loading…
Reference in New Issue