Only return messages that are unread and unseen for an unseen query

b/10970849

Change-Id: I23d40fc39987fab35521f1dd75f4631f1fae16d5
This commit is contained in:
Tony Mantler 2013-09-30 15:32:42 -07:00
parent b38c7d1c37
commit d4a06f409d

View File

@ -2577,6 +2577,7 @@ public class EmailProvider extends ContentProvider {
Message.MAILBOX_KEY + "=? ");
if (unseenOnly) {
sb.append("AND ").append(MessageColumns.FLAG_SEEN).append(" = 0 ");
sb.append("AND ").append(MessageColumns.FLAG_READ).append(" = 0 ");
}
sb.append("ORDER BY " + MessageColumns.TIMESTAMP + " DESC ");
sb.append("LIMIT " + UIProvider.CONVERSATION_PROJECTION_QUERY_CURSOR_WINDOW_LIMT);
@ -2604,6 +2605,7 @@ public class EmailProvider extends ContentProvider {
if (isCombinedMailbox(mailboxId)) {
if (unseenOnly) {
sb.append(MessageColumns.FLAG_SEEN).append("=0 AND ");
sb.append(MessageColumns.FLAG_READ).append("=0 AND ");
}
selectionArgs = null;
} else {