* src/folder.c
authorChristoph Hohmann <reboot@gmx.ch>
Thu, 22 Aug 2002 13:32:16 +0000 (13:32 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Thu, 22 Aug 2002 13:32:16 +0000 (13:32 +0000)
        fix folder update for newsgroups with message
        numbers below minimum number of articles to fetch
        (closes bug #598445)

ChangeLog.claws
configure.in
src/folder.c

index 9dfabf3..1289e95 100644 (file)
@@ -1,3 +1,10 @@
+2002-08-22 [christoph] 0.8.1claws99
+
+       * src/folder.c
+               fix folder update for newsgroups with message
+               numbers below minimum number of articles to fetch
+               (closes bug #598445)
+
 2002-08-22 [paul]      0.8.1claws98
 
        * sync with 0.8.1cvs28
index b2a9451..e7c5ea3 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws98
+EXTRA_VERSION=claws99
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index ff1e22c..cfb7fb7 100644 (file)
@@ -965,13 +965,27 @@ gint folder_item_scan(FolderItem *item)
                num = i + min;
                /* Add message to cache if in folder and not in cache */
                if( (folderscaninfo[i] & IN_FOLDER) && 
-                  !(folderscaninfo[i] & IN_CACHE) && 
-                   (folder->type != F_NEWS ||
-                       (((prefs_common.max_articles == 0) || (num > (max - prefs_common.max_articles))) &&
-                       (num > cache_max)))
-                   ) {
-                       new_list = g_slist_prepend(new_list, GINT_TO_POINTER(num));
-                       debug_print("Remembered message %d for fetching\n", num);
+                  !(folderscaninfo[i] & IN_CACHE)) {
+                       gboolean add = FALSE;
+
+                       switch(folder->type) {
+                               case F_NEWS:
+                                       if((num > cache_max) && 
+                                          ((prefs_common.max_articles == 0) ||
+                                           (max < prefs_common.max_articles) ||
+                                           (num > (max - prefs_common.max_articles)))) {
+                                               add = TRUE;
+                                       }
+                                       break;
+                               default:
+                                       add = TRUE;
+                                       break;
+                       }
+                       
+                       if(add) {
+                               new_list = g_slist_prepend(new_list, GINT_TO_POINTER(num));
+                               debug_print("Remembered message %d for fetching\n", num);
+                       }
                }
                /* Remove message from cache if not in folder and in cache */
                if(!(folderscaninfo[i] & IN_FOLDER) && 
@@ -1059,6 +1073,8 @@ gint folder_item_scan(FolderItem *item)
        g_slist_free(new_list);
        g_free(folderscaninfo);
 
+       folderview_update_item(item, FALSE);
+
        return 0;
 }