mirror of https://github.com/M66B/FairEmail.git
Allow renaming inbox
This commit is contained in:
parent
f6af86c629
commit
08855c7b64
|
@ -2738,20 +2738,19 @@ class Core {
|
||||||
!EntityFolder.SYSTEM.equals(type)) {
|
!EntityFolder.SYSTEM.equals(type)) {
|
||||||
|
|
||||||
// Rename system folders
|
// Rename system folders
|
||||||
if (!EntityFolder.INBOX.equals(type))
|
for (EntityFolder folder : new ArrayList<>(local.values()))
|
||||||
for (EntityFolder folder : new ArrayList<>(local.values()))
|
if (type.equals(folder.type) &&
|
||||||
if (type.equals(folder.type) &&
|
!fullName.equals(folder.name) &&
|
||||||
!fullName.equals(folder.name) &&
|
!local.containsKey(fullName) &&
|
||||||
!local.containsKey(fullName) &&
|
!istore.getFolder(folder.name).exists()) {
|
||||||
!istore.getFolder(folder.name).exists()) {
|
Log.e(account.host +
|
||||||
Log.e(account.host +
|
" renaming " + type + " folder" +
|
||||||
" renaming " + type + " folder" +
|
" from " + folder.name + " to " + fullName);
|
||||||
" from " + folder.name + " to " + fullName);
|
local.remove(folder.name);
|
||||||
local.remove(folder.name);
|
local.put(fullName, folder);
|
||||||
local.put(fullName, folder);
|
folder.name = fullName;
|
||||||
folder.name = fullName;
|
db.folder().setFolderName(folder.id, fullName);
|
||||||
db.folder().setFolderName(folder.id, fullName);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Reselect system folders once
|
// Reselect system folders once
|
||||||
String key = "unset." + account.id + "." + type;
|
String key = "unset." + account.id + "." + type;
|
||||||
|
|
Loading…
Reference in New Issue