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:
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<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) {
|
||||
|
|
Loading…
Reference in a new issue