mirror of https://github.com/M66B/FairEmail.git
Color code all messages
This commit is contained in:
parent
5f4d6bd9ab
commit
d9b59d4896
|
@ -318,7 +318,6 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
||||||
ivAvatar.setVisibility(photo ? View.VISIBLE : View.GONE);
|
ivAvatar.setVisibility(photo ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
vwColor.setBackgroundColor(message.accountColor == null ? Color.TRANSPARENT : message.accountColor);
|
vwColor.setBackgroundColor(message.accountColor == null ? Color.TRANSPARENT : message.accountColor);
|
||||||
vwColor.setVisibility(viewType == ViewType.UNIFIED && message.accountColor != null ? View.VISIBLE : View.GONE);
|
|
||||||
|
|
||||||
ivExpander.setImageResource(show_expanded ? R.drawable.baseline_expand_less_24 : R.drawable.baseline_expand_more_24);
|
ivExpander.setImageResource(show_expanded ? R.drawable.baseline_expand_less_24 : R.drawable.baseline_expand_more_24);
|
||||||
ivExpander.setVisibility(viewType == ViewType.THREAD ? View.VISIBLE : View.GONE);
|
ivExpander.setVisibility(viewType == ViewType.THREAD ? View.VISIBLE : View.GONE);
|
||||||
|
|
|
@ -66,7 +66,7 @@ public interface DaoMessage {
|
||||||
DataSource.Factory<Integer, TupleMessageEx> pagedUnifiedInbox(String sort, boolean debug);
|
DataSource.Factory<Integer, TupleMessageEx> pagedUnifiedInbox(String sort, boolean debug);
|
||||||
|
|
||||||
@Query("SELECT message.*" +
|
@Query("SELECT message.*" +
|
||||||
", account.name AS accountName, IFNULL(identity.color,account.color) AS accountColor" +
|
", account.name AS accountName, identity.color AS accountColor" +
|
||||||
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
||||||
", COUNT(message.id) AS count" +
|
", COUNT(message.id) AS count" +
|
||||||
", SUM(CASE WHEN message.ui_seen" +
|
", SUM(CASE WHEN message.ui_seen" +
|
||||||
|
@ -97,7 +97,7 @@ public interface DaoMessage {
|
||||||
DataSource.Factory<Integer, TupleMessageEx> pagedFolder(long folder, String sort, boolean found, boolean debug);
|
DataSource.Factory<Integer, TupleMessageEx> pagedFolder(long folder, String sort, boolean found, boolean debug);
|
||||||
|
|
||||||
@Query("SELECT message.*" +
|
@Query("SELECT message.*" +
|
||||||
", account.name AS accountName, IFNULL(identity.color,account.color) AS accountColor" +
|
", account.name AS accountName, identity.color AS accountColor" +
|
||||||
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
||||||
", (SELECT COUNT(m1.id) FROM message m1 WHERE m1.account = message.account AND m1.thread = message.thread AND NOT m1.ui_hide) AS count" +
|
", (SELECT COUNT(m1.id) FROM message m1 WHERE m1.account = message.account AND m1.thread = message.thread AND NOT m1.ui_hide) AS count" +
|
||||||
", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" +
|
", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" +
|
||||||
|
@ -168,7 +168,7 @@ public interface DaoMessage {
|
||||||
List<Long> getMessageWithoutPreview();
|
List<Long> getMessageWithoutPreview();
|
||||||
|
|
||||||
@Query("SELECT message.*" +
|
@Query("SELECT message.*" +
|
||||||
", account.name AS accountName, IFNULL(identity.color,account.color) AS accountColor" +
|
", account.name AS accountName, identity.color AS accountColor" +
|
||||||
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
|
||||||
", (SELECT COUNT(m1.id) FROM message m1 WHERE m1.account = message.account AND m1.thread = message.thread AND NOT m1.ui_hide) AS count" +
|
", (SELECT COUNT(m1.id) FROM message m1 WHERE m1.account = message.account AND m1.thread = message.thread AND NOT m1.ui_hide) AS count" +
|
||||||
", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" +
|
", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" +
|
||||||
|
|
Loading…
Reference in New Issue