Changeset 3299 in subversion


Ignore:
Timestamp:
Mar 2, 2010 2:54:11 AM (3 years ago)
Author:
thomasb
Message:

Fix checking for new mail (#1485794)

Location:
trunk/roundcubemail
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r3298 r3299  
    22=========================== 
    33 
     4- Fix checking for new mail: now checks unseen count of inbox (#1485794) 
    45- Improve performance by avoiding unnecessary updates to the session table (#1486325) 
    56- Fix invalid <font> tags which cause HTML message rendering problems (#1486521) 
  • trunk/roundcubemail/program/js/app.js

    r3281 r3299  
    625625          sort_order = this.env.sort_order=='ASC' ? 'DESC' : 'ASC'; 
    626626        else 
    627           sort_order = 'ASC'; 
    628          
     627          sort_order = 'ASC'; 
     628 
    629629        // set table header class 
    630630        $('#rcm'+this.env.sort_col).removeClass('sorted'+(this.env.sort_order.toUpperCase())); 
     
    16191619      this.set_busy(true, 'searching'); 
    16201620      this.http_request('search', '_filter='+filter 
    1621             + (search ? '&_q='+urlencode(search) : '') 
    1622             + (this.env.mailbox ? '&_mbox='+urlencode(this.env.mailbox) : ''), true); 
     1621          + (search ? '&_q='+urlencode(search) : '') 
     1622          + (this.env.mailbox ? '&_mbox='+urlencode(this.env.mailbox) : ''), true); 
    16231623    } 
    16241624 
     
    42614261      case 'moveto': 
    42624262        if (this.env.action == 'show') { 
    4263           // re-enable commands on move/delete error 
    4264           this.enable_command('reply', 'reply-all', 'forward', 'delete', 'mark', 'print', 'open', 'edit', 'viewsource', 'download', true); 
     4263          // re-enable commands on move/delete error 
     4264          this.enable_command('reply', 'reply-all', 'forward', 'delete', 'mark', 'print', 'open', 'edit', 'viewsource', 'download', true); 
    42654265        } else if (this.message_list) 
    42664266          this.message_list.init(); 
     
    42754275          // disable commands useless when mailbox is empty 
    42764276          this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', 'delete',  
    4277             'mark', 'viewsource', 'open', 'edit', 'download', 'print', 'load-attachment',  
    4278             'purge', 'expunge', 'select-all', 'select-none', 'sort', false); 
     4277            'mark', 'viewsource', 'open', 'edit', 'download', 'print', 'load-attachment',  
     4278            'purge', 'expunge', 'select-all', 'select-none', 'sort', false); 
    42794279        } 
    42804280        break; 
     
    43224322 
    43234323  // send periodic request to check for recent messages 
    4324   this.check_for_recent = function(setbusy) 
     4324  this.check_for_recent = function(refresh) 
    43254325    { 
    43264326    if (this.busy) 
    43274327      return; 
    43284328 
    4329     if (setbusy) 
     4329    var addurl = '_t=' + (new Date().getTime()); 
     4330 
     4331    if (refresh) { 
    43304332      this.set_busy(true, 'checkingmail'); 
    4331  
    4332     var addurl = '_t=' + (new Date().getTime()); 
     4333      addurl += '&_refresh=1'; 
     4334    } 
    43334335 
    43344336    if (this.gui_objects.messagelist) 
  • trunk/roundcubemail/program/steps/mail/check_recent.inc

    r3223 r3299  
    2323$check_all = (bool)$RCMAIL->config->get('check_all_folders'); 
    2424 
     25// check if unread count of INBOX changed and refresh message list if so 
     26if (!empty($_GET['_refresh'])) { 
     27  $unread_count = $IMAP->messagecount('INBOX', 'UNSEEN', TRUE); 
     28  if ($unread_count > $_SESSION['unseen_count']['INBOX']) { 
     29    $OUTPUT->command('set_unread_count', 'INBOX', $unread_count, true); 
     30    $OUTPUT->command('list_mailbox', 'INBOX', 1);  // let the client switch to INBOX and get the message list 
     31    $OUTPUT->send(); 
     32  } 
     33} 
     34 
     35// check recent/unseen counts for all mailboxes 
    2536foreach ($a_mailboxes as $mbox_name) { 
    2637  if ($mbox_name == $IMAP->get_mailbox_name()) { 
Note: See TracChangeset for help on using the changeset viewer.