1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-31 07:10:14 -05:00

remove another alternate calling convention for addOrUpdateMessage. Code

will get still cleaner when we start propagating back message folders as objects
This commit is contained in:
Jesse Vincent 2009-12-27 17:20:50 +00:00
parent c608ffb672
commit 6c7782b4bd

View File

@ -1576,7 +1576,12 @@ public class MessageList
{ {
if (updateForMe(account, folder)) if (updateForMe(account, folder))
{ {
addOrUpdateMessage(account, folder, message); FolderInfoHolder f = mCurrentFolder;
// XXX TODO, this is the wrong folder
if (f != null)
{
addOrUpdateMessage(account, f, message);
}
} }
return; return;
@ -1658,7 +1663,12 @@ public class MessageList
{ {
if (updateForMe(account, folder)) if (updateForMe(account, folder))
{ {
addOrUpdateMessage(account, folder, message); FolderInfoHolder f = mCurrentFolder;
// XXX TODO, this is the wrong folder
if (f != null)
{
addOrUpdateMessage(account, f, message);
}
} }
} }
@ -1737,18 +1747,6 @@ public class MessageList
removeMessages(messages); removeMessages(messages);
} }
private void addOrUpdateMessage(Account account, String folder, Message message)
{
// TODO do we want "f" or "mCurrentFolder" below?
FolderInfoHolder f = mCurrentFolder;
if (f != null)
{
addOrUpdateMessage(account, f, message);
}
}
private void addOrUpdateMessage(Account account, FolderInfoHolder folder, Message message) private void addOrUpdateMessage(Account account, FolderInfoHolder folder, Message message)
{ {
List<Message> messages = new ArrayList<Message>(); List<Message> messages = new ArrayList<Message>();