mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-30 17:40:34 +01:00
Added account option to use date header as received time
This commit is contained in:
@@ -102,6 +102,7 @@ public class FragmentAccount extends FragmentBase {
|
||||
private EditText etInterval;
|
||||
private CheckBox cbPartialFetch;
|
||||
private CheckBox cbIgnoreSize;
|
||||
private CheckBox cbUseDate;
|
||||
|
||||
private Button btnCheck;
|
||||
private ContentLoadingProgressBar pbCheck;
|
||||
@@ -204,6 +205,7 @@ public class FragmentAccount extends FragmentBase {
|
||||
etInterval = view.findViewById(R.id.etInterval);
|
||||
cbPartialFetch = view.findViewById(R.id.cbPartialFetch);
|
||||
cbIgnoreSize = view.findViewById(R.id.cbIgnoreSize);
|
||||
cbUseDate = view.findViewById(R.id.cbUseDate);
|
||||
|
||||
btnCheck = view.findViewById(R.id.btnCheck);
|
||||
pbCheck = view.findViewById(R.id.pbCheck);
|
||||
@@ -708,6 +710,7 @@ public class FragmentAccount extends FragmentBase {
|
||||
args.putString("interval", etInterval.getText().toString());
|
||||
args.putBoolean("partial_fetch", cbPartialFetch.isChecked());
|
||||
args.putBoolean("ignore_size", cbIgnoreSize.isChecked());
|
||||
args.putBoolean("use_date", cbUseDate.isChecked());
|
||||
|
||||
args.putSerializable("drafts", drafts);
|
||||
args.putSerializable("sent", sent);
|
||||
@@ -765,6 +768,7 @@ public class FragmentAccount extends FragmentBase {
|
||||
String interval = args.getString("interval");
|
||||
boolean partial_fetch = args.getBoolean("partial_fetch");
|
||||
boolean ignore_size = args.getBoolean("ignore_size");
|
||||
boolean use_date = args.getBoolean("use_date");
|
||||
|
||||
EntityFolder drafts = (EntityFolder) args.getSerializable("drafts");
|
||||
EntityFolder sent = (EntityFolder) args.getSerializable("sent");
|
||||
@@ -848,6 +852,8 @@ public class FragmentAccount extends FragmentBase {
|
||||
return true;
|
||||
if (!Objects.equals(account.ignore_size, ignore_size))
|
||||
return true;
|
||||
if (!Objects.equals(account.use_date, use_date))
|
||||
return true;
|
||||
|
||||
EntityFolder edrafts = db.folder().getFolderByType(account.id, EntityFolder.DRAFTS);
|
||||
if (!Objects.equals(edrafts == null ? null : edrafts.id, drafts == null ? null : drafts.id))
|
||||
@@ -896,7 +902,8 @@ public class FragmentAccount extends FragmentBase {
|
||||
account.notify != notify ||
|
||||
!account.poll_interval.equals(Integer.parseInt(interval)) ||
|
||||
account.partial_fetch != partial_fetch ||
|
||||
account.ignore_size != ignore_size);
|
||||
account.ignore_size != ignore_size ||
|
||||
account.use_date != use_date);
|
||||
Log.i("Account check=" + check + " reload=" + reload);
|
||||
|
||||
Long last_connected = null;
|
||||
@@ -968,6 +975,7 @@ public class FragmentAccount extends FragmentBase {
|
||||
account.poll_interval = Integer.parseInt(interval);
|
||||
account.partial_fetch = partial_fetch;
|
||||
account.ignore_size = ignore_size;
|
||||
account.use_date = use_date;
|
||||
|
||||
if (!update)
|
||||
account.created = now;
|
||||
@@ -1244,6 +1252,7 @@ public class FragmentAccount extends FragmentBase {
|
||||
etInterval.setText(account == null ? "" : Long.toString(account.poll_interval));
|
||||
cbPartialFetch.setChecked(account == null ? true : account.partial_fetch);
|
||||
cbIgnoreSize.setChecked(account == null ? true : account.ignore_size);
|
||||
cbUseDate.setChecked(account == null ? false : account.use_date);
|
||||
|
||||
auth = (account == null ? MailService.AUTH_TYPE_PASSWORD : account.auth_type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user