check if it is read or unread I am trying to make a Zimlet which checks if it is read or unread when a mail is opened from a mail list view.
I wrote a code like this.
--------------------------------------------------------------------------
Disposition_Notification.prototype.match =
function(content, startIndex) {
this._ZmMailListController = this._appCtxt.getApp(ZmZimbraMail.MAIL_APP).getMai lListController();
alert("isUnread1 = " + this._ZmMailListController._getMsg().isUnread);
alert("isUnread2 = " + this._ZmMailListController._listView[this._ZmMailListController._currentView].getSelection()[0].isUnread);
};
--------------------------------------------------------------------------
But this code doesn't work well. Because when a mail is opened (for example, double clicked), mail status changes to "read". So when coming to this method, mail is already "read" all the time.
Is there a good way? |