pan-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pan-devel] [RFC, PATCH] Show Matching Articles' Threads + Match Only Un


From: Jason Lynch
Subject: [Pan-devel] [RFC, PATCH] Show Matching Articles' Threads + Match Only Unread Articles
Date: Tue, 3 Mar 2009 20:11:35 +0000 (UTC)
User-agent: Pan/0.133 (House of Butterflies)

I had been experiencing problems with the "Show Matching Articles' 
Threads" and "Match Only Unread Articles" options. In particular, when 
the first article in a particular thread either doesn't exist or I have 
never retrieved it, Pan seems to ignore that thread in the header display.

>From my cursory examination of the Pan code, the problem comes up in 
accumulate_descendants in pan/data-impl/my-tree.cc, where it will only 
traverse the tree if the node has an associated article. In many cases 
such as the above, it seems that it doesn't, but it does have child nodes 
which do have articles.

The following patch seems to fix the problem for me, but since I am 
woefully unfamiliar with the Pan code and its nuances, I am unsure if it 
is technically correct or if it will break things that I'm not expecting.

Any comments would be appreciated, of course.
---
 pan/data-impl/my-tree.cc |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/pan/data-impl/my-tree.cc b/pan/data-impl/my-tree.cc
index 0758195..82c7f52 100644
--- a/pan/data-impl/my-tree.cc
+++ b/pan/data-impl/my-tree.cc
@@ -317,7 +317,7 @@ DataImpl :: MyTree :: accumulate_descendants 
(unique_nodes_t& descendants,
   // if this node has an article and wasn't already in `descendants',
   // then add it and its children.
 
-  if (node->_article && descendants.insert(node).second)
+  if (node->_article && descendants.insert(node).second || !node-
>_article);
     foreach_const (ArticleNode::children_t, node->_children, it)
       accumulate_descendants (descendants, *it);
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]