mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 23:12:55 +00:00
Show if attachments in conversation
This commit is contained in:
parent
f00f789d10
commit
84493e1d47
3 changed files with 12 additions and 1 deletions
|
@ -1351,7 +1351,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
ibSnoozed.setVisibility(message.ui_snoozed == null && !message.ui_unsnoozed ? View.GONE : View.VISIBLE);
|
||||
ivAnswered.setVisibility(message.ui_answered ? View.VISIBLE : View.GONE);
|
||||
ivForwarded.setVisibility(message.isForwarded() ? View.VISIBLE : View.GONE);
|
||||
ivAttachments.setVisibility(message.attachments > 0 ? View.VISIBLE : View.GONE);
|
||||
ivAttachments.setVisibility(message.totalAttachments > 0 ? View.VISIBLE : View.GONE);
|
||||
|
||||
if (viewType == ViewType.FOLDER)
|
||||
tvFolder.setText(outbox ? message.identityEmail : message.accountName);
|
||||
|
@ -7133,6 +7133,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
same = false;
|
||||
log("visible_unseen changed " + prev.visible_unseen + "/" + next.visible_unseen, next.id);
|
||||
}
|
||||
if (prev.totalAttachments != next.totalAttachments) {
|
||||
same = false;
|
||||
log("totalAttachments changed " + prev.totalAttachments + "/" + next.totalAttachments, next.id);
|
||||
}
|
||||
if (!Objects.equals(prev.totalSize, next.totalSize)) {
|
||||
same = false;
|
||||
log("totalSize changed", next.id);
|
||||
|
|
|
@ -66,6 +66,7 @@ public interface DaoMessage {
|
|||
" WHEN NOT message.hash IS NULL THEN message.hash" +
|
||||
" WHEN NOT message.msgid IS NULL THEN message.msgid" +
|
||||
" ELSE message.id END) AS visible_unseen" +
|
||||
", SUM(message.attachments) AS totalAttachments" +
|
||||
", SUM(message.total) AS totalSize" +
|
||||
", message.priority AS ui_priority" +
|
||||
", message.importance AS ui_importance" +
|
||||
|
@ -144,6 +145,7 @@ public interface DaoMessage {
|
|||
" WHEN NOT message.hash IS NULL THEN message.hash" +
|
||||
" WHEN NOT message.msgid IS NULL THEN message.msgid" +
|
||||
" ELSE message.id END) AS visible_unseen" +
|
||||
", SUM(message.attachments) AS totalAttachments" +
|
||||
", SUM(message.total) AS totalSize" +
|
||||
", message.priority AS ui_priority" +
|
||||
", message.importance AS ui_importance" +
|
||||
|
@ -208,6 +210,7 @@ public interface DaoMessage {
|
|||
", (folder.type = '" + EntityFolder.DRAFTS + "') AS drafts" +
|
||||
", 1 AS visible" +
|
||||
", NOT message.ui_seen AS visible_unseen" +
|
||||
", attachments AS totalAttachments" +
|
||||
", message.total AS totalSize" +
|
||||
", message.priority AS ui_priority" +
|
||||
", message.importance AS ui_importance" +
|
||||
|
@ -487,6 +490,7 @@ public interface DaoMessage {
|
|||
", (folder.type = '" + EntityFolder.DRAFTS + "') AS drafts" +
|
||||
", 1 AS visible" +
|
||||
", NOT message.ui_seen AS visible_unseen" +
|
||||
", message.attachments AS totalAttachments" +
|
||||
", message.total AS totalSize" +
|
||||
", message.priority AS ui_priority" +
|
||||
", message.importance AS ui_importance" +
|
||||
|
@ -517,6 +521,7 @@ public interface DaoMessage {
|
|||
", 0 AS drafts" +
|
||||
", 1 AS visible" +
|
||||
", NOT message.ui_seen AS visible_unseen" +
|
||||
", message.attachments AS totalAttachments" +
|
||||
", message.total AS totalSize" +
|
||||
", message.priority AS ui_priority" +
|
||||
", message.importance AS ui_importance" +
|
||||
|
|
|
@ -59,6 +59,7 @@ public class TupleMessageEx extends EntityMessage {
|
|||
public int drafts;
|
||||
public int visible;
|
||||
public int visible_unseen;
|
||||
public int totalAttachments;
|
||||
public Long totalSize;
|
||||
public Integer ui_priority;
|
||||
public Integer ui_importance;
|
||||
|
@ -163,6 +164,7 @@ public class TupleMessageEx extends EntityMessage {
|
|||
this.drafts == other.drafts &&
|
||||
this.visible == other.visible &&
|
||||
this.visible_unseen == other.visible_unseen &&
|
||||
this.totalAttachments == other.totalAttachments &&
|
||||
Objects.equals(this.totalSize, other.totalSize) &&
|
||||
Objects.equals(this.ui_priority, other.ui_priority) &&
|
||||
Objects.equals(this.ui_importance, other.ui_importance) &&
|
||||
|
|
Loading…
Reference in a new issue