From a65e1701976ce2770cdb140e4e8e1a0dc0ee36f7 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 16 Apr 2020 17:09:33 +0200 Subject: [PATCH] Refactoring --- app/src/main/java/eu/faircode/email/EntityAccount.java | 1 + app/src/main/java/eu/faircode/email/FragmentPop.java | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/EntityAccount.java b/app/src/main/java/eu/faircode/email/EntityAccount.java index 74a9f136b6..c309ef85f1 100644 --- a/app/src/main/java/eu/faircode/email/EntityAccount.java +++ b/app/src/main/java/eu/faircode/email/EntityAccount.java @@ -52,6 +52,7 @@ public class EntityAccount extends EntityOrder implements Serializable { // https://tools.ietf.org/html/rfc2177 static final int DEFAULT_KEEP_ALIVE_INTERVAL = 15; // minutes static final int DEFAULT_POLL_INTERVAL = 15; // minutes + static final int DEFAULT_MAX_MESSAGES = 100; // POP3 static final int TYPE_IMAP = 0; static final int TYPE_POP = 1; diff --git a/app/src/main/java/eu/faircode/email/FragmentPop.java b/app/src/main/java/eu/faircode/email/FragmentPop.java index d654b70117..b290189880 100644 --- a/app/src/main/java/eu/faircode/email/FragmentPop.java +++ b/app/src/main/java/eu/faircode/email/FragmentPop.java @@ -99,8 +99,6 @@ public class FragmentPop extends FragmentBase { private static final int REQUEST_COLOR = 1; private static final int REQUEST_DELETE = 2; - private static final int MAX_MESSAGES = 100; - @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -560,7 +558,7 @@ public class FragmentPop extends FragmentBase { cbLeaveDeleted.setChecked(account == null ? true : account.leave_deleted); cbLeaveDevice.setChecked(account == null ? false : account.leave_on_device); etMax.setText(Integer.toString(account == null || account.max_messages == null - ? MAX_MESSAGES : account.max_messages)); + ? EntityAccount.DEFAULT_MAX_MESSAGES : account.max_messages)); etInterval.setText(account == null ? "" : Long.toString(account.poll_interval)); new SimpleTask() {