1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00
k-9/src/com/fsck/k9/activity/MessageInfoHolder.java
Rob Bayer fdb1267cb1 Add remote IMAP search support.
* rbayer/IMAPsearch: (21 commits)
  More cleanup
  Code Cleanup getRemoteSearchFullText -> isRemoteSearchFullText line wraps for preference items
  Refactor to allow fetching of extra search results beyond original request.  Most code moved out of ImapStore and ImapFolder and into MessagingController.searchRemoteMessagesSynchronous.  Should make it easier to add remoteSearch for other server types.
  Prevent delete of search results while search results open
  remove duplicated code block
  Don't hide Crypto when IMAPsearch disabled
  Code Style Cleanup: Tabs -> 4 spaces Remove trailing whitespace from blank lines
  tabs -> spaces (my bad...)
  Fix opening of folders to be Read-Write when necessary, even if they were previously opened Read-Only.
  add missing file
  Working IMAP search, with passable UI.
  UI improvements
  Simple help info when enabling Remote Search
  Dependency for preferences
  Basic IMAP search working
2012-09-13 09:10:37 -07:00

54 lines
1.3 KiB
Java

package com.fsck.k9.activity;
import java.util.Date;
import com.fsck.k9.helper.MessageHelper;
import com.fsck.k9.mail.Message;
public class MessageInfoHolder {
public String date;
public Date compareDate;
public Date compareArrival;
public String compareSubject;
public CharSequence sender;
public String senderAddress;
public String compareCounterparty;
public String[] recipients;
public String uid;
public boolean read;
public boolean answered;
public boolean forwarded;
public boolean flagged;
public boolean dirty;
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();
}
public String getDate(MessageHelper messageHelper) {
if (date == null) {
date = messageHelper.formatDate(message.getSentDate());
}
return date;
}
}