mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-24 08:38:51 -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();
|
||||
remoteFolder = remoteStore.getFolder(folder);
|
||||
|
||||
if (!remoteFolder.exists()) {
|
||||
if (!remoteFolder.exists() || !remoteFolder.isFlagSupported(Flag.SEEN)) {
|
||||
return;
|
||||
}
|
||||
remoteFolder.open(OpenMode.READ_WRITE);
|
||||
|
@ -283,7 +283,9 @@ public class Pop3Store extends Store {
|
||||
@Override
|
||||
public void close() {
|
||||
try {
|
||||
executeSimpleCommand("QUIT");
|
||||
if (isOpen()) {
|
||||
executeSimpleCommand("QUIT");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
/*
|
||||
* QUIT may fail if the connection is already closed. We don't care. It's just
|
||||
|
Loading…
Reference in New Issue
Block a user