mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Always list personal root namespace
This commit is contained in:
parent
8f402c8105
commit
6ce4ddb474
1 changed files with 15 additions and 5 deletions
|
@ -2031,14 +2031,24 @@ class Core {
|
||||||
List<Pair<Folder, Folder>> ifolders = new ArrayList<>();
|
List<Pair<Folder, Folder>> ifolders = new ArrayList<>();
|
||||||
List<String> subscription = new ArrayList<>();
|
List<String> subscription = new ArrayList<>();
|
||||||
|
|
||||||
Folder[] personal;
|
List<Folder> personal = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
personal = istore.getPersonalNamespaces();
|
Folder[] pnamespaces = istore.getPersonalNamespaces();
|
||||||
if (personal.length == 0)
|
|
||||||
throw new MessagingException("Empty personal namespaces");
|
boolean root = false;
|
||||||
|
Folder d = istore.getDefaultFolder();
|
||||||
|
if (pnamespaces != null) {
|
||||||
|
personal.addAll(Arrays.asList(pnamespaces));
|
||||||
|
for (Folder p : pnamespaces)
|
||||||
|
if (d.getFullName().equals(p.getFullName())) {
|
||||||
|
root = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!root)
|
||||||
|
personal.add(d);
|
||||||
} catch (MessagingException ex) {
|
} catch (MessagingException ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
personal = new Folder[]{istore.getDefaultFolder()};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Folder namespace : personal) {
|
for (Folder namespace : personal) {
|
||||||
|
|
Loading…
Reference in a new issue