Skip to content

Commit 38fff35

Browse files
author
Peter McCluskey
committed
Changed to sort on sender date when use_sender_date = 1
1 parent 70d78a9 commit 38fff35

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
Version Changes for Hypermail
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
Peter McCluskey (Jul 29, 2005)
5+
Changed to sort on sender date rather than from date when displaying
6+
sender date as a result of use_sender_date = 1.
7+
38
Peter McCluskey (Jun 23, 2005)
49
Some small changes from Vincent McIntyre to make date-range in index of
510
folders link to default index page, to use CSS instead of <th> to

src/struct.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,8 @@ struct header *addheader(struct header *hp, struct emailinfo *email, int sorttyp
962962
break;
963963
case 2:
964964
yearsecs = email->fromdate;
965+
if (set_use_sender_date)
966+
yearsecs = email->date;
965967
if (set_reverse)
966968
isbigger = (yearsecs < hp->data->datenum) ? 0 : 1;
967969
else
@@ -978,12 +980,12 @@ struct header *addheader(struct header *hp, struct emailinfo *email, int sorttyp
978980
else
979981
hp->right = addheader(hp->right, email, sorttype, depth + 1);
980982

981-
if (sorttype == 2 && depth < max_depth / 2 && !(++count_d % 3)) {
983+
if (sorttype == 2 && depth < max_depth / 2 && !(++count_d % 3)) {
982984
/* semi-random rebalancing */
983985
struct header **hpp = (set_reverse ? &hp->left : &hp->right);
984986
struct header *hp1 = *hpp;
985-
if (hp1 != NULL && (hp1->right != NULL || hp1->left != NULL)) {
986-
if (hp1->right != NULL && (hp1->left == NULL || (count_d & 1))) {
987+
if (hp1 != NULL && (hp1->right != NULL || hp1->left != NULL)) {
988+
if (hp1->right != NULL && (hp1->left == NULL || (count_d & 1))) {
987989
struct header *p = hp1->right;
988990
hp1->right = p->left;
989991
p->left = hp1;

0 commit comments

Comments
 (0)