Cashed last opened thread, that greatly increase tree opening speed, especially useful for READGotoThNextUnread.
This commit is contained in:
parent
7184b3e471
commit
673ebc8bca
@ -10,6 +10,8 @@ _____________________________________________________________________________
|
||||
‡ ¬¥âª¨ ¤«ï GoldED+ 1.1.5, /snapshot/
|
||||
_____________________________________________________________________________
|
||||
|
||||
+ ’¥¯¥אל קט¨אד¥גבן ¯®ב«¥₪¨© ®ג×אכגכ© גאם₪, חג® ב¨«ל® ¯®¢כב¨«® ב×®א®בגל
|
||||
¯®¢ג®א®£® ¥£® ®ג×אכג¨ן. <20>ב®¡¥® םג® § ¬¥ג® READGotoThNextUnread.
|
||||
+ Š®£¤ á®®¡é¥¨¥ ¯¥à¥¬¥é ¥âáï ¨§ ª®à§¨ë, â® ¢ë¡¨à ¥âáï ¯® 㬮«ç ¨î à¨ï
|
||||
¨§ ª«ã¤¦ AREA.
|
||||
- uudecoder: ⥯¥àì ¡ã¤¥â ¨£®à¨à®¢ ® ¢á¥ ¯®á«¥ áâப¨ çâ® ç¨ ¥âáï
|
||||
|
@ -10,6 +10,9 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
+ Cashed last opened thread, that greatly increase tree opening speed,
|
||||
especially useful for READGotoThNextUnread.
|
||||
|
||||
+ When moving from recyclebin, area from AREA: kludge is selected by default.
|
||||
|
||||
- uudecoder: now are skipped all lines which follows line that starts
|
||||
|
@ -732,6 +732,10 @@ private:
|
||||
std::vector<ThreadEntry> list;
|
||||
std::vector<std::string> tree;
|
||||
|
||||
dword m_OldMsgno;
|
||||
uint m_OldTags;
|
||||
std::string m_OldEchoId;
|
||||
|
||||
void BuildThreadIndex(dword msgno);
|
||||
void recursive_build(uint32_t msgn, uint32_t rn, uint32_t level, uint32_t index);
|
||||
void GenTree(int idx);
|
||||
@ -1073,20 +1077,16 @@ void GThreadlist::BuildThreadIndex(dword msgn)
|
||||
{
|
||||
w_info(LNG->Wait);
|
||||
|
||||
index = maximum_index = position = maximum_position = 0;
|
||||
|
||||
list.clear();
|
||||
tree.clear();
|
||||
|
||||
AA->LoadHdr(&msg, msgn);
|
||||
|
||||
uint32_t msgno = msg.link.to();
|
||||
uint32_t prevmsgno = msgn;
|
||||
|
||||
// Search backwards
|
||||
while(AA->Msgn.ToReln(msgno)) {
|
||||
|
||||
if(not AA->LoadHdr(&msg, msgno)) {
|
||||
while(AA->Msgn.ToReln(msgno))
|
||||
{
|
||||
if (not AA->LoadHdr(&msg, msgno))
|
||||
{
|
||||
msg.link.to_set(0);
|
||||
msgno = prevmsgno;
|
||||
AA->LoadHdr(&msg, msgno);
|
||||
@ -1097,9 +1097,17 @@ void GThreadlist::BuildThreadIndex(dword msgn)
|
||||
msgno = msg.link.to();
|
||||
}
|
||||
|
||||
recursive_build(msg.msgno, 0, 0, 0);
|
||||
if ((m_OldMsgno != prevmsgno) || (m_OldTags != AA->Msgn.Tags()) || (m_OldEchoId != AA->echoid()))
|
||||
{
|
||||
m_OldMsgno = prevmsgno;
|
||||
m_OldTags = AA->Msgn.Tags();
|
||||
m_OldEchoId = AA->echoid();
|
||||
|
||||
w_info(NULL);
|
||||
index = maximum_index = position = maximum_position = 0;
|
||||
list.clear();
|
||||
tree.clear();
|
||||
|
||||
recursive_build(msg.msgno, 0, 0, 0);
|
||||
|
||||
minimum_index = 0;
|
||||
maximum_index = list.size() - 1;
|
||||
@ -1108,10 +1116,14 @@ void GThreadlist::BuildThreadIndex(dword msgn)
|
||||
h_offset = 0;
|
||||
new_hoffset = 0;
|
||||
|
||||
for(uint i = 0; i<list.size(); i++) {
|
||||
if(list[i].msgno == msgn)
|
||||
for (uint i = 0; i < list.size(); i++)
|
||||
{
|
||||
if (list[i].msgno == msgn)
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
||||
w_info(NULL);
|
||||
}
|
||||
|
||||
|
||||
@ -1304,6 +1316,8 @@ void GThreadlist::Run() {
|
||||
|
||||
if(not aborted)
|
||||
AA->set_lastread(AA->Msgn.ToReln(list[index].msgno));
|
||||
|
||||
ResetMsg(&msg);
|
||||
}
|
||||
|
||||
|
||||
@ -1355,18 +1369,24 @@ bool GThreadlist::GoNextUnread(bool reader)
|
||||
}
|
||||
}
|
||||
|
||||
ResetMsg(&msg);
|
||||
return found;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void MsgThreadlist() {
|
||||
GThreadlist *g_ThreadList = 0;
|
||||
|
||||
GThreadlist p;
|
||||
|
||||
p.Run();
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void MsgThreadlist()
|
||||
{
|
||||
if (!g_ThreadList)
|
||||
g_ThreadList = new GThreadlist;
|
||||
|
||||
g_ThreadList->Run();
|
||||
}
|
||||
|
||||
|
||||
@ -1374,11 +1394,13 @@ void MsgThreadlist() {
|
||||
|
||||
void GotoThNextUnread()
|
||||
{
|
||||
if (!g_ThreadList)
|
||||
g_ThreadList = new GThreadlist;
|
||||
|
||||
w_info(LNG->Wait);
|
||||
reader_direction = DIR_NEXT;
|
||||
|
||||
GThreadlist p;
|
||||
if (!p.GoNextUnread(true))
|
||||
if (!g_ThreadList->GoNextUnread(true))
|
||||
{
|
||||
SayBibi();
|
||||
reader_keyok = true;
|
||||
|
@ -33,6 +33,9 @@
|
||||
extern bool cmdlinenoscan;
|
||||
extern bool cmdlineexportsoup;
|
||||
|
||||
class GThreadlist;
|
||||
extern GThreadlist *g_ThreadList;
|
||||
|
||||
GMsg* reader_msg;
|
||||
bool reader_gen_confirm = false;
|
||||
int reader_finished;
|
||||
@ -1030,6 +1033,9 @@ void Reader() {
|
||||
|
||||
} while(not reader_finished and not gkbd.quitall);
|
||||
|
||||
delete g_ThreadList;
|
||||
g_ThreadList = 0;
|
||||
|
||||
HeaderView->Destroy();
|
||||
BodyView->Destroy();
|
||||
}
|
||||
|
Reference in New Issue
Block a user