1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-29 11:15:51 +00:00

Always list personal root namespace

This commit is contained in:
M66B 2021-09-30 11:35:38 +02:00
parent 8f402c8105
commit 6ce4ddb474

View file

@ -2031,14 +2031,24 @@ class Core {
List<Pair<Folder, Folder>> ifolders = new ArrayList<>();
List<String> subscription = new ArrayList<>();
Folder[] personal;
List<Folder> personal = new ArrayList<>();
try {
personal = istore.getPersonalNamespaces();
if (personal.length == 0)
throw new MessagingException("Empty personal namespaces");
Folder[] pnamespaces = istore.getPersonalNamespaces();
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) {
Log.e(ex);
personal = new Folder[]{istore.getDefaultFolder()};
}
for (Folder namespace : personal) {