mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 06:01:12 +00:00
Refactoring
This commit is contained in:
parent
c293968b5a
commit
b11a23af56
2 changed files with 5 additions and 3 deletions
|
@ -165,10 +165,14 @@ public class EntityFolder implements Serializable {
|
|||
|
||||
static int getLevel(Character separator, String name) {
|
||||
int level = 0;
|
||||
if (separator != null)
|
||||
if (separator != null) {
|
||||
for (int i = 0; i < name.length(); i++)
|
||||
if (name.charAt(i) == separator)
|
||||
level++;
|
||||
if (name.startsWith("INBOX" + separator))
|
||||
level--;
|
||||
}
|
||||
|
||||
return level;
|
||||
}
|
||||
|
||||
|
|
|
@ -1952,8 +1952,6 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
|
||||
if (selectable) {
|
||||
int level = EntityFolder.getLevel(separator, fullName);
|
||||
if (fullName.startsWith("INBOX" + separator))
|
||||
level--;
|
||||
|
||||
EntityFolder folder = db.folder().getFolderByName(account.id, fullName);
|
||||
if (folder == null) {
|
||||
|
|
Loading…
Reference in a new issue