mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 13:12:25 -05:00
Fixed error handling code when trying to view a message that does not exists
This code was lost during the merge of issue4-1.x branch
This commit is contained in:
parent
115c4cb6ef
commit
04717b817a
@ -2168,7 +2168,11 @@ public class MessagingController implements Runnable {
|
|||||||
LocalFolder localFolder = (LocalFolder) localStore.getFolder(folder);
|
LocalFolder localFolder = (LocalFolder) localStore.getFolder(folder);
|
||||||
localFolder.open(OpenMode.READ_WRITE);
|
localFolder.open(OpenMode.READ_WRITE);
|
||||||
|
|
||||||
Message message = localFolder.getMessage(uid);
|
LocalMessage message = (LocalMessage)localFolder.getMessage(uid);
|
||||||
|
if (message==null
|
||||||
|
|| message.getId()==0) {
|
||||||
|
throw new IllegalArgumentException("Message not found: folder=" + folder + ", uid=" + uid);
|
||||||
|
}
|
||||||
|
|
||||||
for (MessagingListener l : getListeners()) {
|
for (MessagingListener l : getListeners()) {
|
||||||
l.loadMessageForViewHeadersAvailable(account, folder, uid, message);
|
l.loadMessageForViewHeadersAvailable(account, folder, uid, message);
|
||||||
|
Loading…
Reference in New Issue
Block a user