mirror of https://github.com/M66B/FairEmail.git
Set guessed folder type properties
This commit is contained in:
parent
f7023f0c5a
commit
06f8be22f2
|
@ -496,6 +496,7 @@ public class EmailService implements AutoCloseable {
|
||||||
}
|
}
|
||||||
if (!has) {
|
if (!has) {
|
||||||
guess.type = gtype;
|
guess.type = gtype;
|
||||||
|
guess.setProperties();
|
||||||
Log.i(guess.name + " guessed type=" + gtype);
|
Log.i(guess.name + " guessed type=" + gtype);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,7 +197,10 @@ public class EntityFolder extends EntityOrder implements Serializable {
|
||||||
public EntityFolder(String fullName, String type) {
|
public EntityFolder(String fullName, String type) {
|
||||||
this.name = fullName;
|
this.name = fullName;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
setProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setProperties() {
|
||||||
int sync = EntityFolder.SYSTEM_FOLDER_SYNC.indexOf(type);
|
int sync = EntityFolder.SYSTEM_FOLDER_SYNC.indexOf(type);
|
||||||
this.synchronize = (sync >= 0);
|
this.synchronize = (sync >= 0);
|
||||||
this.download = (sync < 0 || EntityFolder.SYSTEM_FOLDER_DOWNLOAD.get(sync));
|
this.download = (sync < 0 || EntityFolder.SYSTEM_FOLDER_DOWNLOAD.get(sync));
|
||||||
|
|
|
@ -670,6 +670,7 @@ public class FragmentAccount extends FragmentBase {
|
||||||
}
|
}
|
||||||
if (!has) {
|
if (!has) {
|
||||||
guess.type = gtype;
|
guess.type = gtype;
|
||||||
|
guess.setProperties();
|
||||||
Log.i(guess.name + " guessed type=" + gtype);
|
Log.i(guess.name + " guessed type=" + gtype);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue