Results 1 to 2 of 2

Thread: check if it is read or unread

  1. #1
    Yokomie is offline Intermediate Member
    Join Date
    Feb 2007
    Posts
    20
    Rep Power
    8

    Default 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?

  2. #2
    JoshuaPrismon is offline Zimlet Guru & Moderator
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    9

    Default

    Quote Originally Posted by Yokomie View Post
    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?
    Listen for the change view event (notifyZimlets) and check to make sure the screen is the one you want. Since Zimbra will always mark something read when you select (unless you go back and unmark it) you can do your proccessing when the view is updated.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Relay Issues with windows mobile 5 device
    By astarr in forum Zimbra Mobile
    Replies: 15
    Last Post: 04-19-2007, 04:17 PM
  2. Recipient address rejected
    By stillSpirit in forum Installation
    Replies: 13
    Last Post: 08-10-2006, 06:22 PM
  3. Mail logs
    By Rick Baker in forum Installation
    Replies: 8
    Last Post: 01-17-2006, 04:33 PM
  4. Can Not Start MTA
    By JonathanC in forum Installation
    Replies: 53
    Last Post: 12-06-2005, 11:40 AM
  5. READ and UNREAD on IE/Windows and FF/Linux
    By vpoorboy in forum Users
    Replies: 1
    Last Post: 12-01-2005, 02:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •