mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 11:25:13 +01:00
Added folder subtype flagged
This commit is contained in:
@@ -78,6 +78,7 @@ public class EntityFolder extends EntityOrder implements Serializable {
|
||||
@NonNull
|
||||
public String type;
|
||||
public String inherited_type;
|
||||
public String subtype;
|
||||
@NonNull
|
||||
public Integer level = 0; // obsolete
|
||||
@NonNull
|
||||
@@ -157,6 +158,8 @@ public class EntityFolder extends EntityOrder implements Serializable {
|
||||
static final String SYSTEM = "System";
|
||||
static final String USER = "User";
|
||||
|
||||
static final String FLAGGED = "flagged";
|
||||
|
||||
// https://tools.ietf.org/html/rfc6154
|
||||
// https://www.iana.org/assignments/imap-mailbox-name-attributes/imap-mailbox-name-attributes.xhtml
|
||||
private static final List<String> SYSTEM_FOLDER_ATTR = Collections.unmodifiableList(Arrays.asList(
|
||||
@@ -507,6 +510,13 @@ public class EntityFolder extends EntityOrder implements Serializable {
|
||||
return USER;
|
||||
}
|
||||
|
||||
static String getSubtype(String[] attrs, String fullname) {
|
||||
for (String attr : attrs)
|
||||
if ("\\Flagged".equals(attr)) // Gmail
|
||||
return FLAGGED;
|
||||
return null;
|
||||
}
|
||||
|
||||
private static class TypeScore {
|
||||
@NonNull
|
||||
private String type;
|
||||
|
||||
Reference in New Issue
Block a user