1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-22 22:21:18 +00:00

Show account color always

This commit is contained in:
M66B 2018-12-17 09:50:11 +01:00
parent c3b501c7b8
commit 4840eb6287
3 changed files with 4 additions and 4 deletions

View file

@ -118,7 +118,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
itemView.setAlpha(folder.hide ? 0.5f : 1.0f);
vwColor.setBackgroundColor(folder.accountColor == null ? Color.TRANSPARENT : folder.accountColor);
vwColor.setVisibility(account < 0 ? View.VISIBLE : View.GONE);
//vwColor.setVisibility(account < 0 ? View.VISIBLE : View.GONE);
if (account > 0) {
ViewGroup.LayoutParams lp = vwLevel.getLayoutParams();

View file

@ -81,7 +81,7 @@ public interface DaoMessage {
" AND NOT (folder.id <> :folder AND folder.type = '" + EntityFolder.DRAFTS + "') THEN 0 ELSE 1 END)";
@Query("SELECT message.*" +
", account.name AS accountName, identity.color AS accountColor, account.notify AS accountNotify" +
", account.name AS accountName, IFNULL(identity.color, account.color) AS accountColor, account.notify AS accountNotify" +
", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" +
", COUNT(message.id) AS count" +
", " + unseen_folder + " AS unseen" +
@ -108,7 +108,7 @@ public interface DaoMessage {
DataSource.Factory<Integer, TupleMessageEx> pagedFolder(long folder, boolean threading, String sort, boolean found, boolean debug);
@Query("SELECT message.*" +
", account.name AS accountName, identity.color AS accountColor, account.notify AS accountNotify" +
", account.name AS accountName, IFNULL(identity.color, account.color) AS accountColor, account.notify AS accountNotify" +
", 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" +
", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" +

View file

@ -124,8 +124,8 @@ public class EntityFolder implements Serializable {
); // MUST match SYSTEM_FOLDER_ATTR
static final List<String> FOLDER_SORT_ORDER = Arrays.asList(
INBOX,
OUTBOX,
INBOX,
DRAFTS,
SENT,
ARCHIVE,