From b2a08d969b8959f25bb91a3ea506267569b3856e Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sat, 16 Oct 2010 08:27:58 +0000 Subject: [PATCH] Revert "For the common case of "getMessage" where we actually have the object in" This doesn't work on initial sync, since the comparisons fail and you're left with duplicates in the displayed mailbox This reverts commit fa1c88bec348d0132acc60a320626bf0ca1170ec. --- src/com/fsck/k9/activity/MessageList.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index 877ef6dbd..deeab5a0e 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -2396,19 +2396,7 @@ public class MessageList } public MessageInfoHolder getMessage(Message message) { - - synchronized (mAdapter.messages) - { - int index = mAdapter.messages.indexOf(message); - if (index == -1) - { - return null; - } - else - { - return mAdapter.messages.get(index); - } - } + return getMessage(message.makeMessageReference()); } // XXX TODO - make this not use a for loop