mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-09 18:43:23 +02:00
Refactoring
This commit is contained in:
@@ -615,8 +615,12 @@ public class FragmentAccount extends FragmentBase {
|
||||
|
||||
// Check IMAP server / get folders
|
||||
String protocol = "imap" + (starttls ? "" : "s");
|
||||
try (EmailService iservice = new EmailService(context, protocol, realm, insecure, EmailService.PURPOSE_CHECK, true)) {
|
||||
iservice.connect(host, Integer.parseInt(port), auth, provider, user, password, fingerprint);
|
||||
try (EmailService iservice = new EmailService(
|
||||
context, protocol, realm, insecure, EmailService.PURPOSE_CHECK, true)) {
|
||||
iservice.connect(
|
||||
host, Integer.parseInt(port),
|
||||
auth, provider,
|
||||
user, password, fingerprint);
|
||||
|
||||
result.idle = iservice.hasCapability("IDLE");
|
||||
|
||||
@@ -983,8 +987,12 @@ public class FragmentAccount extends FragmentBase {
|
||||
EntityFolder inbox = null;
|
||||
if (check) {
|
||||
String protocol = "imap" + (starttls ? "" : "s");
|
||||
try (EmailService iservice = new EmailService(context, protocol, realm, insecure, EmailService.PURPOSE_CHECK, true)) {
|
||||
iservice.connect(host, Integer.parseInt(port), auth, provider, user, password, fingerprint);
|
||||
try (EmailService iservice = new EmailService(
|
||||
context, protocol, realm, insecure, EmailService.PURPOSE_CHECK, true)) {
|
||||
iservice.connect(
|
||||
host, Integer.parseInt(port),
|
||||
auth, provider,
|
||||
user, password, fingerprint);
|
||||
|
||||
for (Folder ifolder : iservice.getStore().getDefaultFolder().list("*")) {
|
||||
// Check folder attributes
|
||||
|
||||
Reference in New Issue
Block a user