Decode folder hierarchy

This commit is contained in:
M66B
2019-03-17 19:32:57 +00:00
parent 60a87826c9
commit 0927dd7d8f
5 changed files with 1679 additions and 1 deletions

View File

@@ -63,6 +63,7 @@ public class EntityFolder implements Serializable {
@PrimaryKey(autoGenerate = true)
public Long id;
public Long account; // Outbox = null
public Long parent;
@NonNull
public String name;
@NonNull
@@ -239,6 +240,19 @@ public class EntityFolder implements Serializable {
return level;
}
String getParentName(Character separator) {
if (separator == null)
return null;
else {
int p = name.lastIndexOf(separator);
if (p < 0)
return null;
else
return name.substring(0, p);
}
}
@Override
public boolean equals(Object obj) {
if (obj instanceof EntityFolder) {