Commit 305c75fe authored by deuce's avatar deuce
Browse files

Don't read all headers for each message base.

parent d3210198
...@@ -38,10 +38,7 @@ function get_my_message_offsets() ...@@ -38,10 +38,7 @@ function get_my_message_offsets()
continue; continue;
if(idx.to!=user.number) if(idx.to!=user.number)
continue; continue;
if((hdr=msgbase.get_msg_header(true,last_offset))==null)
continue;
msg=new Array; msg=new Array;
msg["hdr"]=hdr;
msg.idx=idx; msg.idx=idx;
msg.offset=last_offset; msg.offset=last_offset;
offsets.push(msg); offsets.push(msg);
...@@ -58,9 +55,7 @@ function get_all_message_offsets() ...@@ -58,9 +55,7 @@ function get_all_message_offsets()
for(last_offset=0; (idx=msgbase.get_msg_index(true,last_offset)) != null;last_offset++) { for(last_offset=0; (idx=msgbase.get_msg_index(true,last_offset)) != null;last_offset++) {
if(idx.attr&MSG_DELETE) if(idx.attr&MSG_DELETE)
continue; continue;
hdr=msgbase.get_msg_header(true,last_offset);
msg=new Object; msg=new Object;
msg.hdr=hdr;
msg.idx=idx; msg.idx=idx;
msg.offset=last_offset; msg.offset=last_offset;
offsets.push(msg); offsets.push(msg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment