1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-03-03 01:51:49 -05:00

Minor refactoring of flag setting code

This commit is contained in:
Jesse Vincent 2010-11-15 01:31:16 +00:00
parent 36714d3b4a
commit 4f4fe87d5f

View File

@ -6288,7 +6288,10 @@ public class LocalStore extends Store implements Serializable, LocalStoreMigrati
}
if ( flag == Flag.SEEN && !isSet(Flag.DELETED))
if ( !isSet(Flag.DELETED) )
{
if ( flag == Flag.SEEN )
{
if (set != isSet(Flag.SEEN))
{
@ -6296,11 +6299,12 @@ public class LocalStore extends Store implements Serializable, LocalStoreMigrati
}
}
if (flag == Flag.FLAGGED && !isSet(Flag.DELETED))
if ( flag == Flag.FLAGGED )
{
folder.setFlaggedMessageCount(folder.getFlaggedMessageCount() + (set ? 1 : -1));
}
}
}
catch (MessagingException me)
{
Log.e(K9.LOG_TAG, "Unable to update LocalStore unread message count",