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<>();
|
||||
result.add("");
|
||||
result.add("-");
|
||||
for (EntityFolder folder : folders)
|
||||
result.add(folder.name);
|
||||
|
||||
|
@ -565,7 +565,9 @@ public class FragmentDialogFolder extends FragmentDialogBase {
|
|||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
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();
|
||||
if (TextUtils.isEmpty(name))
|
||||
sendResult(RESULT_CANCELED);
|
||||
|
|
Loading…
Reference in New Issue