Move updateMoreMessages() from MessagingController to ImapSync
This commit is contained in:
parent
29886079e4
commit
c6e06adfe7
1 changed files with 13 additions and 5 deletions
|
@ -800,6 +800,19 @@ class ImapSync {
|
|||
}
|
||||
}
|
||||
|
||||
private void updateMoreMessages(Folder remoteFolder, LocalFolder localFolder, Date earliestDate, int remoteStart)
|
||||
throws MessagingException, IOException {
|
||||
|
||||
if (remoteStart == 1) {
|
||||
localFolder.setMoreMessages(MoreMessages.FALSE);
|
||||
} else {
|
||||
boolean moreMessagesAvailable = remoteFolder.areMoreMessagesAvailable(remoteStart, earliestDate);
|
||||
|
||||
MoreMessages newMoreMessages = (moreMessagesAvailable) ? MoreMessages.TRUE : MoreMessages.FALSE;
|
||||
localFolder.setMoreMessages(newMoreMessages);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Methods calling back to MessagingController
|
||||
|
@ -807,11 +820,6 @@ class ImapSync {
|
|||
* TODO: Move all of these to an interface so we don't have to depend on MessagingController directly
|
||||
*/
|
||||
|
||||
private void updateMoreMessages(Folder remoteFolder, LocalFolder localFolder, Date earliestDate, int remoteStart)
|
||||
throws IOException, MessagingException {
|
||||
controller.updateMoreMessages(remoteFolder, localFolder, earliestDate, remoteStart);
|
||||
}
|
||||
|
||||
private boolean shouldNotifyForMessage(Account account, LocalFolder localFolder, Message message) {
|
||||
return controller.shouldNotifyForMessage(account, localFolder, message);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue