1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-24 08:38:51 -05:00

Add some more documentation about temporary notification avoidance code using UIDs.

This commit is contained in:
Andrew Chen 2011-01-03 03:26:31 +00:00
parent 4c6ebef9a8
commit 68ded8aa3e

View File

@ -5309,6 +5309,22 @@ public class LocalStore extends Store implements Serializable
return mLastUid;
}
/**
* <p>Fetches the most recent <b>numeric</b> UID value in this folder. This is used by
* {@link com.fsck.k9.controller.MessagingController#shouldNotifyForMessage} to see if messages being
* fetched are new and unread. Messages are "new" if they have a UID higher than the most recent UID prior
* to synchronization.</p>
*
* <p>This only works for protocols with numeric UIDs (like IMAP). For protocols with
* alphanumeric UIDs (like POP), this method quietly fails and shouldNotifyForMessage() will
* always notify for unread messages.</p>
*
* <p>Once Issue 1072 has been fixed, this method and shouldNotifyForMessage() should be
* updated to use internal dates rather than UIDs to determine new-ness. While this doesn't
* solve things for POP (which doesn't have internal dates), we can likely use this as a
* framework to examine send date in lieu of internal date.</p>
* @throws MessagingException
*/
public void updateLastUid() throws MessagingException
{
Integer lastUid = database.execute(false, new DbCallback<Integer>()