[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pan-users] [RFC, PATCH] Show Matching Articles' Threads + Match Only Un
From: |
Jason Lynch |
Subject: |
[Pan-users] [RFC, PATCH] Show Matching Articles' Threads + Match Only Unread Articles |
Date: |
Fri, 4 Dec 2009 16:41:08 +0000 (UTC) |
User-agent: |
Pan/0.133 (House of Butterflies) |
I originally posted this a few months ago to the devel list, but both
groups were pretty dead at the time, so I'm going to repost now that
there's some activity:
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.
(Months later, I've personally been using this patch for months which
both solves the problem and has never crashed on me. However, I remain
unsure if it is the best solution.)
Any comments would be appreciated, of course.
---
pan/data-impl/my-tree.cc | 2 +-
1 files changed, 1 insertions(+), 1 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);
}
--
1.6.5.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pan-users] [RFC, PATCH] Show Matching Articles' Threads + Match Only Unread Articles,
Jason Lynch <=