mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
Added method Folder.isFlagSupported(Flag)
This commit is contained in:
parent
e90a479384
commit
ba9bc2f8e9
@ -2174,14 +2174,7 @@ public class MessagingController implements Runnable {
|
||||
|
||||
Store remoteStore = account.getRemoteStore();
|
||||
Folder remoteFolder = remoteStore.getFolder(folder);
|
||||
if (!remoteFolder.exists() ||
|
||||
/*
|
||||
* Don't proceed if the remote folder doesn't support flags and
|
||||
* the flag to be changed isn't the deleted flag. This avoids
|
||||
* unnecessary connections to POP3 servers.
|
||||
*/
|
||||
// TODO: This should actually call a supportsSettingFlag(flag) method.
|
||||
(!remoteFolder.supportsFetchingFlags() && !Flag.DELETED.equals(flag))) {
|
||||
if (!remoteFolder.exists() || !remoteFolder.isFlagSupported(flag)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -153,9 +153,13 @@ public abstract class Folder {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isFlagSupported(Flag flag) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean supportsFetchingFlags() {
|
||||
return true;
|
||||
}//isFlagSupported
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
@ -891,6 +891,11 @@ public class Pop3Store extends Store {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlagSupported(Flag flag) {
|
||||
return (flag == Flag.DELETED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFetchingFlags() {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user