Skip to content
Snippets Groups Projects
Commit 5cb6500d authored by deuce's avatar deuce
Browse files

Work around for when thread_next points to a nonexistant message.

parent 5a0f0d04
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,7 @@ if(new_stats[msg_number].inherit_new)
var saved_msg_number;
var hdr;
var last_good_message=msg_number;
var last_next=0;
msg_number=headers[top_msg].thread_first;
while(msg_number && msg_number != top_msg) {
......@@ -60,8 +61,9 @@ if(new_stats[msg_number].inherit_new)
//}
}
if(hdr.thread_next) {
if(hdr.thread_next && hdr.thread_next != last_next) {
msg_number=hdr.thread_next;
last_next=msg_number;
moved_back=false;
continue;
}
......
......@@ -99,7 +99,7 @@ else {
continue;
}
}
if(hdr.thread_next)
if(hdr.thread_next && these_headers[msg_number]==undefined)
msg_number=hdr.thread_next;
else
msg_number=hdr.thread_back;
......@@ -126,6 +126,7 @@ for(i in top_level) {
if(headers[top_msg].when_imported_time > last_mod_time)
last_mod_time=headers[top_msg].when_imported_time;
var last_good_message=top_msg;
var last_next=0;
msg_number=headers[top_msg].thread_first;
while(msg_number && msg_number != top_msg) {
......@@ -168,7 +169,8 @@ for(i in top_level) {
continue;
}
}
if(hdr.thread_next) {
if(hdr.thread_next && hdr.thread_next != last_next) {
last_next=hdr.thread_next;
msg_number=hdr.thread_next;
moved_back=false;
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment