mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Eliminate expensive and unused expungedUid map.
This commit is contained in:
parent
b35f807820
commit
a308ce8a2d
@ -175,10 +175,6 @@ public class MessagingController implements Runnable
|
||||
// Key is accountUuid:folderName:messageUid , value is unimportant
|
||||
private ConcurrentHashMap<String, String> deletedUids = new ConcurrentHashMap<String, String>();
|
||||
|
||||
// Key is accountUuid:folderName , value is a long of the highest message UID ever emptied from Trash
|
||||
private ConcurrentHashMap<String, Long> expungedUid = new ConcurrentHashMap<String, Long>();
|
||||
|
||||
|
||||
private String createMessageKey(Account account, String folder, Message message)
|
||||
{
|
||||
return createMessageKey(account, folder, message.getUid());
|
||||
@ -189,11 +185,6 @@ public class MessagingController implements Runnable
|
||||
return account.getUuid() + ":" + folder + ":" + uid;
|
||||
}
|
||||
|
||||
private String createFolderKey(Account account, String folder)
|
||||
{
|
||||
return account.getUuid() + ":" + folder;
|
||||
}
|
||||
|
||||
private void suppressMessage(Account account, String folder, Message message)
|
||||
{
|
||||
|
||||
@ -228,30 +219,10 @@ public class MessagingController implements Runnable
|
||||
{
|
||||
return true;
|
||||
}
|
||||
Long expungedUidL = expungedUid.get(createFolderKey(account, folder));
|
||||
if (expungedUidL != null)
|
||||
{
|
||||
long expungedUid = expungedUidL;
|
||||
String messageUidS = message.getUid();
|
||||
try
|
||||
{
|
||||
long messageUid = Long.parseLong(messageUidS);
|
||||
if (messageUid <= expungedUid)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (NumberFormatException nfe)
|
||||
{
|
||||
// Nothing to do
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private MessagingController(Application application)
|
||||
{
|
||||
mApplication = application;
|
||||
|
Loading…
Reference in New Issue
Block a user