mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 13:12:25 -05:00
Only mark all messages as read on the server if that's supported
This change prevents K-9 Mail from establishing a connection to the server when all messages are marked as read on a POP3 account.
This commit is contained in:
parent
ba9bc2f8e9
commit
dc96bf3186
@ -2378,7 +2378,7 @@ public class MessagingController implements Runnable {
|
|||||||
Store remoteStore = account.getRemoteStore();
|
Store remoteStore = account.getRemoteStore();
|
||||||
remoteFolder = remoteStore.getFolder(folder);
|
remoteFolder = remoteStore.getFolder(folder);
|
||||||
|
|
||||||
if (!remoteFolder.exists()) {
|
if (!remoteFolder.exists() || !remoteFolder.isFlagSupported(Flag.SEEN)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
remoteFolder.open(OpenMode.READ_WRITE);
|
remoteFolder.open(OpenMode.READ_WRITE);
|
||||||
|
@ -283,7 +283,9 @@ public class Pop3Store extends Store {
|
|||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
try {
|
try {
|
||||||
|
if (isOpen()) {
|
||||||
executeSimpleCommand("QUIT");
|
executeSimpleCommand("QUIT");
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
/*
|
/*
|
||||||
* QUIT may fail if the connection is already closed. We don't care. It's just
|
* QUIT may fail if the connection is already closed. We don't care. It's just
|
||||||
|
Loading…
Reference in New Issue
Block a user