Unlimited reply link chain (max was 30 replies)
This commit is contained in:
@@ -1046,17 +1046,17 @@ void GThreadlist::recursive_build(uint32_t msgn, uint32_t rn, uint32_t level) {
|
||||
}
|
||||
}
|
||||
|
||||
if(found or (list_size == 0))
|
||||
if (found or (list_size == 0))
|
||||
list.push_back(t);
|
||||
|
||||
recursive_build(msg.link.first(), msg.link.list(0), level+1);
|
||||
|
||||
for(int n=0; n < msg.link.list_max()-1; n++) {
|
||||
if(msg.link.list(n)) {
|
||||
for(size_t n = 0, max = msg.link.list_max(); n < max; n++)
|
||||
{
|
||||
if (msg.link.list(n))
|
||||
recursive_build(msg.link.list(n), msg.link.list(n+1), level+1);
|
||||
} else
|
||||
break;
|
||||
}
|
||||
|
||||
AA->LoadHdr(&msg, oldmsgno);
|
||||
}
|
||||
}
|
||||
|
@@ -220,21 +220,18 @@ void MarkMsgs_Txt(int item, char* markstring) {
|
||||
|
||||
static void recursive_mark(GMsg* msg, uint32_t msgno, bool markasread)
|
||||
{
|
||||
int i;
|
||||
gmsg_links templink;
|
||||
|
||||
if(AA->Msgn.ToReln(msgno) and AA->LoadHdr(msg, msgno, false)) {
|
||||
|
||||
templink = msg->link;
|
||||
if (AA->Msgn.ToReln(msgno) and AA->LoadHdr(msg, msgno, false))
|
||||
{
|
||||
gmsg_links templink = msg->link;
|
||||
|
||||
if (!markasread)
|
||||
{
|
||||
if(templink.first())
|
||||
if (templink.first())
|
||||
AA->Mark.Add(templink.first());
|
||||
|
||||
for(i = 0; i < templink.list_max(); i++)
|
||||
for (size_t i = 0, max = templink.list_max(); i < max; i++)
|
||||
{
|
||||
if(templink.list(i))
|
||||
if (templink.list(i))
|
||||
AA->Mark.Add(templink.list(i));
|
||||
}
|
||||
}
|
||||
@@ -244,13 +241,13 @@ static void recursive_mark(GMsg* msg, uint32_t msgno, bool markasread)
|
||||
AA->UpdateTimesread(msg);
|
||||
}
|
||||
|
||||
if(templink.first())
|
||||
if (templink.first())
|
||||
recursive_mark(msg, templink.first(), markasread);
|
||||
|
||||
for(i = 0; i < templink.list_max(); i++) {
|
||||
if(templink.list(i)) {
|
||||
for (size_t i = 0, max = templink.list_max(); i < max; i++)
|
||||
{
|
||||
if (templink.list(i))
|
||||
recursive_mark(msg, templink.list(i), markasread);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1151,17 +1151,22 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
|
||||
if(AA->LoadHdr(reply, reply_msgno, false)) {
|
||||
uint32_t replynext;
|
||||
bool ok2save = false;
|
||||
if(streql(AA->basetype(), "SQUISH")) {
|
||||
if(reply->link.first()) {
|
||||
for(int r=0; r<reply->link.list_max()-1; r++) {
|
||||
if(reply->link.list(r) == 0) {
|
||||
|
||||
if (streql(AA->basetype(), "SQUISH"))
|
||||
{
|
||||
if (reply->link.first())
|
||||
{
|
||||
for (size_t r = 0; !ok2save; r++)
|
||||
{
|
||||
if (reply->link.list(r) == 0)
|
||||
{
|
||||
reply->link.list_set(r, msg->msgno);
|
||||
ok2save = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
reply->link.first_set(msg->msgno);
|
||||
ok2save = true;
|
||||
}
|
||||
|
@@ -1052,16 +1052,18 @@ void Reader() {
|
||||
// ------------------------------------------------------------------
|
||||
// Determine if the message has replies
|
||||
|
||||
uint32_t MsgHasReplies(GMsg* msg) {
|
||||
|
||||
if(msg->link.first())
|
||||
uint32_t MsgHasReplies(GMsg* msg)
|
||||
{
|
||||
if (msg->link.first())
|
||||
return msg->link.first();
|
||||
|
||||
for(int n=0; n<msg->link.list_max(); n++)
|
||||
if(msg->link.list(n))
|
||||
for (size_t n = 0, max = msg->link.list_max(); n < max; n++)
|
||||
{
|
||||
if (msg->link.list(n))
|
||||
return msg->link.list(n);
|
||||
}
|
||||
|
||||
if(msg->link.next())
|
||||
if (msg->link.next())
|
||||
return msg->link.next();
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user