2010-08-17 22:49:13 -04:00
|
|
|
package com.fsck.k9.activity;
|
2010-10-13 06:53:08 -04:00
|
|
|
import com.fsck.k9.helper.MessageHelper;
|
2010-08-17 22:49:13 -04:00
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
import com.fsck.k9.mail.Message;
|
|
|
|
|
2010-09-21 18:12:45 -04:00
|
|
|
public class MessageInfoHolder
|
2010-08-17 22:49:13 -04:00
|
|
|
{
|
|
|
|
public String subject;
|
|
|
|
public String date;
|
|
|
|
public Date compareDate;
|
|
|
|
public String compareSubject;
|
2010-08-30 10:37:34 -04:00
|
|
|
public CharSequence sender;
|
2010-08-17 22:49:13 -04:00
|
|
|
public String senderAddress;
|
|
|
|
public String compareCounterparty;
|
|
|
|
public String preview;
|
|
|
|
public String[] recipients;
|
|
|
|
public boolean hasAttachments;
|
|
|
|
public String uid;
|
|
|
|
public boolean read;
|
|
|
|
public boolean answered;
|
|
|
|
public boolean flagged;
|
|
|
|
public boolean downloaded;
|
|
|
|
public boolean partially_downloaded;
|
2010-10-08 01:34:33 -04:00
|
|
|
public boolean dirty;
|
2010-10-21 16:48:45 -04:00
|
|
|
public boolean toMe;
|
|
|
|
public boolean ccMe;
|
2010-08-17 22:49:13 -04:00
|
|
|
public Message message;
|
|
|
|
public FolderInfoHolder folder;
|
|
|
|
public boolean selected;
|
|
|
|
public String account;
|
|
|
|
public String uri;
|
|
|
|
|
|
|
|
// Empty constructor for comparison
|
|
|
|
public MessageInfoHolder()
|
|
|
|
{
|
|
|
|
this.selected = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean equals(Object o)
|
|
|
|
{
|
|
|
|
if (o instanceof MessageInfoHolder == false)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
MessageInfoHolder other = (MessageInfoHolder)o;
|
|
|
|
return message.equals(other.message);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int hashCode()
|
|
|
|
{
|
|
|
|
return uid.hashCode();
|
|
|
|
}
|
|
|
|
|
2010-10-21 16:49:20 -04:00
|
|
|
public String getDate(MessageHelper messageHelper)
|
|
|
|
{
|
|
|
|
if (date == null)
|
|
|
|
{
|
2010-10-13 06:53:08 -04:00
|
|
|
date = messageHelper.formatDate(message.getSentDate());
|
|
|
|
}
|
|
|
|
return date;
|
|
|
|
}
|
2010-08-17 22:49:13 -04:00
|
|
|
}
|