Changeset 2303

Show
Ignore:
Timestamp:
06/29/07 10:40:00
Author:
pvanhoof
Message:

Bugfix in poke status

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libtinymail-camel/tny-camel-folder.c

    r2295 r2303  
    34993499        TnyFolderChange *change = tny_folder_change_new (self); 
    35003500        TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (self); 
    3501  
    3502         priv->cached_length = (guint) info->total; 
    3503         tny_folder_change_set_new_all_count (change, priv->cached_length); 
    3504         priv->unread_length = (guint) info->unread; 
    3505         tny_folder_change_set_new_unread_count (change, priv->unread_length); 
    3506         notify_folder_observers_about (self, change); 
     3501        gboolean do_something = FALSE; 
     3502 
     3503        if (info->total != -1) { 
     3504                do_something = TRUE; 
     3505                priv->cached_length = (guint) info->total; 
     3506                tny_folder_change_set_new_all_count (change, priv->cached_length); 
     3507        } 
     3508        if (info->unread != -1) { 
     3509                do_something = TRUE; 
     3510                priv->unread_length = (guint) info->unread; 
     3511                tny_folder_change_set_new_unread_count (change, priv->unread_length); 
     3512        } 
     3513 
     3514        if (do_something) 
     3515                notify_folder_observers_about (self, change); 
    35073516 
    35083517        g_object_unref (change);