From 6e23a5e8e6db40761d7960b753136908a1ef498a Mon Sep 17 00:00:00 2001 From: Danny Baumann Date: Wed, 30 Jan 2013 17:12:44 +0100 Subject: [PATCH] Show thread as unread if at least one of the messages of the thread is unread. Fixes issue 4759. --- src/com/fsck/k9/provider/EmailProvider.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/fsck/k9/provider/EmailProvider.java b/src/com/fsck/k9/provider/EmailProvider.java index 9b93df964..708b2a598 100644 --- a/src/com/fsck/k9/provider/EmailProvider.java +++ b/src/com/fsck/k9/provider/EmailProvider.java @@ -397,6 +397,8 @@ public class EmailProvider extends ContentProvider { if (MessageColumns.ID.equals(columnName)) { query.append("u." + MessageColumns.ID + " AS " + MessageColumns.ID); + } else if (MessageColumns.READ.equals(columnName)) { + query.append("MIN(read) AS " + MessageColumns.READ); } else if (MessageColumns.DATE.equals(columnName)) { query.append("MAX(date) AS " + MessageColumns.DATE); } else if (SpecialColumns.THREAD_COUNT.equals(columnName)) {