GreetingItem greetingItem = null;
for (int i = 0; i < result.size(); i++) {
greetingItem = result.get(i);
ContactItem currentContact = null;
for (ContactItem contactItem : contactItemList) {
if (contactItem.getEmail().equals(greetingItem.getEmail())) {
currentContact = contactItem;
break;
}
}
if (currentContact.isEnable()) {
cellFormatter.addStyleName(i - skipCount, 0, currentContact.getStyle() + "_bkcolor");
StringBuilder sb = new StringBuilder();
if (isLocalStorageSupported() && greetingItem.getTimestamp() > lastTimestamp) {
sb.append("<img src='/images/new_icon.jpg' width='33px' Height='19px'/><br/>");
newMsgNum++;
}
sb.append("[" + DateTimeFormat.getMediumDateTimeFormat().format(greetingItem.getDataTime()) + "] ").append("<b>")
.append(currentContact.getNickName()).append(" wrote: </b>").append("<br/>").append("<blockquote><pre>")
.append(greetingItem.isEncrypt() ? decrypt(encryptKey, greetingItem.getContent()) : greetingItem.getContent())
.append("</pre></blockquote>");
this.flexTable.setHTML(i - skipCount, 0, sb.toString());