Less Array::map, more manual loops.
Map is slow. http://jsperf.com/arraymap
This commit is contained in:
parent
08241a213f
commit
dec9775f80
@ -3310,12 +3310,11 @@
|
|||||||
return $.event('IndexRefresh');
|
return $.event('IndexRefresh');
|
||||||
},
|
},
|
||||||
buildHRs: function(threadRoots) {
|
buildHRs: function(threadRoots) {
|
||||||
var node, nodes, _i, _len;
|
var i, node, nodes;
|
||||||
nodes = [];
|
nodes = [];
|
||||||
for (_i = 0, _len = threadRoots.length; _i < _len; _i++) {
|
i = 0;
|
||||||
node = threadRoots[_i];
|
while (node = threadRoots[i++]) {
|
||||||
nodes.push(node);
|
nodes.push(node, $.el('hr'));
|
||||||
nodes.push($.el('hr'));
|
|
||||||
}
|
}
|
||||||
return nodes;
|
return nodes;
|
||||||
},
|
},
|
||||||
@ -3360,7 +3359,7 @@
|
|||||||
return Main.callbackNodes(Post, posts);
|
return Main.callbackNodes(Post, posts);
|
||||||
},
|
},
|
||||||
buildCatalogViews: function() {
|
buildCatalogViews: function() {
|
||||||
var catalogThreads, thread, _i, _len, _ref;
|
var catalogThreads, nodes, thread, _i, _j, _len, _len1, _ref, _ref1;
|
||||||
catalogThreads = [];
|
catalogThreads = [];
|
||||||
_ref = Index.sortedThreads;
|
_ref = Index.sortedThreads;
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
@ -3370,9 +3369,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Main.callbackNodes(CatalogThread, catalogThreads);
|
Main.callbackNodes(CatalogThread, catalogThreads);
|
||||||
return Index.sortedThreads.map(function(thread) {
|
nodes = [];
|
||||||
return thread.catalogView.nodes.root;
|
_ref1 = Index.sortedThreads;
|
||||||
});
|
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||||
|
thread = _ref1[_j];
|
||||||
|
nodes.push(thread.catalogView.nodes.root);
|
||||||
|
}
|
||||||
|
return nodes;
|
||||||
},
|
},
|
||||||
sizeCatalogViews: function(nodes) {
|
sizeCatalogViews: function(nodes) {
|
||||||
var height, node, ratio, size, thumb, width, _i, _len, _ref;
|
var height, node, ratio, size, thumb, width, _i, _len, _ref;
|
||||||
@ -3390,13 +3393,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
sort: function() {
|
sort: function() {
|
||||||
var sortedThreadIDs;
|
var sortedThreadIDs, sortedThreads, threadID, _i, _len;
|
||||||
switch (Conf['Index Sort']) {
|
sortedThreads = [];
|
||||||
case 'bump':
|
sortedThreadIDs = [];
|
||||||
sortedThreadIDs = Index.liveThreadIDs;
|
({
|
||||||
break;
|
'bump': function() {
|
||||||
case 'lastreply':
|
return sortedThreadIDs = Index.liveThreadIDs;
|
||||||
sortedThreadIDs = __slice.call(Index.liveThreadData).sort(function(a, b) {
|
},
|
||||||
|
'lastreply': function() {
|
||||||
|
var data, liveData, _i, _len;
|
||||||
|
liveData = __slice.call(Index.liveThreadData).sort(function(a, b) {
|
||||||
var _ref, _ref1;
|
var _ref, _ref1;
|
||||||
if ('last_replies' in a) {
|
if ('last_replies' in a) {
|
||||||
_ref = a.last_replies, a = _ref[_ref.length - 1];
|
_ref = a.last_replies, a = _ref[_ref.length - 1];
|
||||||
@ -3405,32 +3411,43 @@
|
|||||||
_ref1 = b.last_replies, b = _ref1[_ref1.length - 1];
|
_ref1 = b.last_replies, b = _ref1[_ref1.length - 1];
|
||||||
}
|
}
|
||||||
return b.no - a.no;
|
return b.no - a.no;
|
||||||
}).map(function(data) {
|
|
||||||
return data.no;
|
|
||||||
});
|
});
|
||||||
break;
|
for (_i = 0, _len = liveData.length; _i < _len; _i++) {
|
||||||
case 'birth':
|
data = liveData[_i];
|
||||||
sortedThreadIDs = __slice.call(Index.liveThreadIDs).sort(function(a, b) {
|
sortedThreadIDs.push(data.no);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'birth': function() {
|
||||||
|
return sortedThreadIDs = __slice.call(Index.liveThreadIDs).sort(function(a, b) {
|
||||||
return b - a;
|
return b - a;
|
||||||
});
|
});
|
||||||
break;
|
},
|
||||||
case 'replycount':
|
'replycount': function() {
|
||||||
sortedThreadIDs = __slice.call(Index.liveThreadData).sort(function(a, b) {
|
var data, liveData, _i, _len;
|
||||||
|
liveData = __slice.call(Index.liveThreadData).sort(function(a, b) {
|
||||||
return b.replies - a.replies;
|
return b.replies - a.replies;
|
||||||
}).map(function(data) {
|
|
||||||
return data.no;
|
|
||||||
});
|
});
|
||||||
break;
|
for (_i = 0, _len = liveData.length; _i < _len; _i++) {
|
||||||
case 'filecount':
|
data = liveData[_i];
|
||||||
sortedThreadIDs = __slice.call(Index.liveThreadData).sort(function(a, b) {
|
sortedThreadIDs.push(data.no);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'filecount': function() {
|
||||||
|
var data, liveData, _i, _len;
|
||||||
|
liveData = __slice.call(Index.liveThreadData).sort(function(a, b) {
|
||||||
return b.images - a.images;
|
return b.images - a.images;
|
||||||
}).map(function(data) {
|
|
||||||
return data.no;
|
|
||||||
});
|
});
|
||||||
|
for (_i = 0, _len = liveData.length; _i < _len; _i++) {
|
||||||
|
data = liveData[_i];
|
||||||
|
sortedThreadIDs.push(data.no);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})[Conf['Index Sort']]();
|
||||||
|
for (_i = 0, _len = sortedThreadIDs.length; _i < _len; _i++) {
|
||||||
|
threadID = sortedThreadIDs[_i];
|
||||||
|
sortedThreads.push(g.BOARD.threads[threadID]);
|
||||||
}
|
}
|
||||||
Index.sortedThreads = sortedThreadIDs.map(function(threadID) {
|
Index.sortedThreads = sortedThreads.filter(function(thread) {
|
||||||
return g.BOARD.threads[threadID];
|
|
||||||
}).filter(function(thread) {
|
|
||||||
return thread.isHidden === Index.showHiddenThreads;
|
return thread.isHidden === Index.showHiddenThreads;
|
||||||
});
|
});
|
||||||
if (Index.isSearching) {
|
if (Index.isSearching) {
|
||||||
@ -3455,7 +3472,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
buildIndex: function(infinite) {
|
buildIndex: function(infinite) {
|
||||||
var nodes, pageNum, threads, threadsPerPage;
|
var nodes, pageNum, thread, threads, threadsPerPage, _i, _j, _len, _len1, _ref;
|
||||||
switch (Conf['Index Mode']) {
|
switch (Conf['Index Mode']) {
|
||||||
case 'paged':
|
case 'paged':
|
||||||
case 'infinite':
|
case 'infinite':
|
||||||
@ -3466,9 +3483,11 @@
|
|||||||
}
|
}
|
||||||
threadsPerPage = Index.getThreadsNumPerPage();
|
threadsPerPage = Index.getThreadsNumPerPage();
|
||||||
threads = Index.sortedThreads.slice(threadsPerPage * pageNum, threadsPerPage * (pageNum + 1));
|
threads = Index.sortedThreads.slice(threadsPerPage * pageNum, threadsPerPage * (pageNum + 1));
|
||||||
nodes = threads.map(function(thread) {
|
nodes = [];
|
||||||
return thread.OP.nodes.root.parentNode;
|
for (_i = 0, _len = threads.length; _i < _len; _i++) {
|
||||||
});
|
thread = threads[_i];
|
||||||
|
nodes.push(thread.OP.nodes.root.parentNode);
|
||||||
|
}
|
||||||
Index.buildReplies(threads);
|
Index.buildReplies(threads);
|
||||||
nodes = Index.buildHRs(nodes);
|
nodes = Index.buildHRs(nodes);
|
||||||
Index.buildPagelist();
|
Index.buildPagelist();
|
||||||
@ -3479,9 +3498,12 @@
|
|||||||
Index.sizeCatalogViews(nodes);
|
Index.sizeCatalogViews(nodes);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
nodes = Index.sortedThreads.map(function(thread) {
|
nodes = [];
|
||||||
return thread.OP.nodes.root.parentNode;
|
_ref = Index.sortedThreads;
|
||||||
});
|
for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
|
||||||
|
thread = _ref[_j];
|
||||||
|
nodes.push(thread.OP.nodes.root.parentNode);
|
||||||
|
}
|
||||||
Index.buildReplies(Index.sortedThreads);
|
Index.buildReplies(Index.sortedThreads);
|
||||||
nodes = Index.buildHRs(nodes);
|
nodes = Index.buildHRs(nodes);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3369,12 +3369,11 @@
|
|||||||
return $.event('IndexRefresh');
|
return $.event('IndexRefresh');
|
||||||
},
|
},
|
||||||
buildHRs: function(threadRoots) {
|
buildHRs: function(threadRoots) {
|
||||||
var node, nodes, _i, _len;
|
var i, node, nodes;
|
||||||
nodes = [];
|
nodes = [];
|
||||||
for (_i = 0, _len = threadRoots.length; _i < _len; _i++) {
|
i = 0;
|
||||||
node = threadRoots[_i];
|
while (node = threadRoots[i++]) {
|
||||||
nodes.push(node);
|
nodes.push(node, $.el('hr'));
|
||||||
nodes.push($.el('hr'));
|
|
||||||
}
|
}
|
||||||
return nodes;
|
return nodes;
|
||||||
},
|
},
|
||||||
@ -3419,7 +3418,7 @@
|
|||||||
return Main.callbackNodes(Post, posts);
|
return Main.callbackNodes(Post, posts);
|
||||||
},
|
},
|
||||||
buildCatalogViews: function() {
|
buildCatalogViews: function() {
|
||||||
var catalogThreads, thread, _i, _len, _ref;
|
var catalogThreads, nodes, thread, _i, _j, _len, _len1, _ref, _ref1;
|
||||||
catalogThreads = [];
|
catalogThreads = [];
|
||||||
_ref = Index.sortedThreads;
|
_ref = Index.sortedThreads;
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
@ -3429,9 +3428,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Main.callbackNodes(CatalogThread, catalogThreads);
|
Main.callbackNodes(CatalogThread, catalogThreads);
|
||||||
return Index.sortedThreads.map(function(thread) {
|
nodes = [];
|
||||||
return thread.catalogView.nodes.root;
|
_ref1 = Index.sortedThreads;
|
||||||
});
|
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||||
|
thread = _ref1[_j];
|
||||||
|
nodes.push(thread.catalogView.nodes.root);
|
||||||
|
}
|
||||||
|
return nodes;
|
||||||
},
|
},
|
||||||
sizeCatalogViews: function(nodes) {
|
sizeCatalogViews: function(nodes) {
|
||||||
var height, node, ratio, size, thumb, width, _i, _len, _ref;
|
var height, node, ratio, size, thumb, width, _i, _len, _ref;
|
||||||
@ -3449,13 +3452,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
sort: function() {
|
sort: function() {
|
||||||
var sortedThreadIDs;
|
var sortedThreadIDs, sortedThreads, threadID, _i, _len;
|
||||||
switch (Conf['Index Sort']) {
|
sortedThreads = [];
|
||||||
case 'bump':
|
sortedThreadIDs = [];
|
||||||
sortedThreadIDs = Index.liveThreadIDs;
|
({
|
||||||
break;
|
'bump': function() {
|
||||||
case 'lastreply':
|
return sortedThreadIDs = Index.liveThreadIDs;
|
||||||
sortedThreadIDs = __slice.call(Index.liveThreadData).sort(function(a, b) {
|
},
|
||||||
|
'lastreply': function() {
|
||||||
|
var data, liveData, _i, _len;
|
||||||
|
liveData = __slice.call(Index.liveThreadData).sort(function(a, b) {
|
||||||
var _ref, _ref1;
|
var _ref, _ref1;
|
||||||
if ('last_replies' in a) {
|
if ('last_replies' in a) {
|
||||||
_ref = a.last_replies, a = _ref[_ref.length - 1];
|
_ref = a.last_replies, a = _ref[_ref.length - 1];
|
||||||
@ -3464,32 +3470,43 @@
|
|||||||
_ref1 = b.last_replies, b = _ref1[_ref1.length - 1];
|
_ref1 = b.last_replies, b = _ref1[_ref1.length - 1];
|
||||||
}
|
}
|
||||||
return b.no - a.no;
|
return b.no - a.no;
|
||||||
}).map(function(data) {
|
|
||||||
return data.no;
|
|
||||||
});
|
});
|
||||||
break;
|
for (_i = 0, _len = liveData.length; _i < _len; _i++) {
|
||||||
case 'birth':
|
data = liveData[_i];
|
||||||
sortedThreadIDs = __slice.call(Index.liveThreadIDs).sort(function(a, b) {
|
sortedThreadIDs.push(data.no);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'birth': function() {
|
||||||
|
return sortedThreadIDs = __slice.call(Index.liveThreadIDs).sort(function(a, b) {
|
||||||
return b - a;
|
return b - a;
|
||||||
});
|
});
|
||||||
break;
|
},
|
||||||
case 'replycount':
|
'replycount': function() {
|
||||||
sortedThreadIDs = __slice.call(Index.liveThreadData).sort(function(a, b) {
|
var data, liveData, _i, _len;
|
||||||
|
liveData = __slice.call(Index.liveThreadData).sort(function(a, b) {
|
||||||
return b.replies - a.replies;
|
return b.replies - a.replies;
|
||||||
}).map(function(data) {
|
|
||||||
return data.no;
|
|
||||||
});
|
});
|
||||||
break;
|
for (_i = 0, _len = liveData.length; _i < _len; _i++) {
|
||||||
case 'filecount':
|
data = liveData[_i];
|
||||||
sortedThreadIDs = __slice.call(Index.liveThreadData).sort(function(a, b) {
|
sortedThreadIDs.push(data.no);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'filecount': function() {
|
||||||
|
var data, liveData, _i, _len;
|
||||||
|
liveData = __slice.call(Index.liveThreadData).sort(function(a, b) {
|
||||||
return b.images - a.images;
|
return b.images - a.images;
|
||||||
}).map(function(data) {
|
|
||||||
return data.no;
|
|
||||||
});
|
});
|
||||||
|
for (_i = 0, _len = liveData.length; _i < _len; _i++) {
|
||||||
|
data = liveData[_i];
|
||||||
|
sortedThreadIDs.push(data.no);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})[Conf['Index Sort']]();
|
||||||
|
for (_i = 0, _len = sortedThreadIDs.length; _i < _len; _i++) {
|
||||||
|
threadID = sortedThreadIDs[_i];
|
||||||
|
sortedThreads.push(g.BOARD.threads[threadID]);
|
||||||
}
|
}
|
||||||
Index.sortedThreads = sortedThreadIDs.map(function(threadID) {
|
Index.sortedThreads = sortedThreads.filter(function(thread) {
|
||||||
return g.BOARD.threads[threadID];
|
|
||||||
}).filter(function(thread) {
|
|
||||||
return thread.isHidden === Index.showHiddenThreads;
|
return thread.isHidden === Index.showHiddenThreads;
|
||||||
});
|
});
|
||||||
if (Index.isSearching) {
|
if (Index.isSearching) {
|
||||||
@ -3514,7 +3531,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
buildIndex: function(infinite) {
|
buildIndex: function(infinite) {
|
||||||
var nodes, pageNum, threads, threadsPerPage;
|
var nodes, pageNum, thread, threads, threadsPerPage, _i, _j, _len, _len1, _ref;
|
||||||
switch (Conf['Index Mode']) {
|
switch (Conf['Index Mode']) {
|
||||||
case 'paged':
|
case 'paged':
|
||||||
case 'infinite':
|
case 'infinite':
|
||||||
@ -3525,9 +3542,11 @@
|
|||||||
}
|
}
|
||||||
threadsPerPage = Index.getThreadsNumPerPage();
|
threadsPerPage = Index.getThreadsNumPerPage();
|
||||||
threads = Index.sortedThreads.slice(threadsPerPage * pageNum, threadsPerPage * (pageNum + 1));
|
threads = Index.sortedThreads.slice(threadsPerPage * pageNum, threadsPerPage * (pageNum + 1));
|
||||||
nodes = threads.map(function(thread) {
|
nodes = [];
|
||||||
return thread.OP.nodes.root.parentNode;
|
for (_i = 0, _len = threads.length; _i < _len; _i++) {
|
||||||
});
|
thread = threads[_i];
|
||||||
|
nodes.push(thread.OP.nodes.root.parentNode);
|
||||||
|
}
|
||||||
Index.buildReplies(threads);
|
Index.buildReplies(threads);
|
||||||
nodes = Index.buildHRs(nodes);
|
nodes = Index.buildHRs(nodes);
|
||||||
Index.buildPagelist();
|
Index.buildPagelist();
|
||||||
@ -3538,9 +3557,12 @@
|
|||||||
Index.sizeCatalogViews(nodes);
|
Index.sizeCatalogViews(nodes);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
nodes = Index.sortedThreads.map(function(thread) {
|
nodes = [];
|
||||||
return thread.OP.nodes.root.parentNode;
|
_ref = Index.sortedThreads;
|
||||||
});
|
for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
|
||||||
|
thread = _ref[_j];
|
||||||
|
nodes.push(thread.OP.nodes.root.parentNode);
|
||||||
|
}
|
||||||
Index.buildReplies(Index.sortedThreads);
|
Index.buildReplies(Index.sortedThreads);
|
||||||
nodes = Index.buildHRs(nodes);
|
nodes = Index.buildHRs(nodes);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -616,9 +616,9 @@ Index =
|
|||||||
|
|
||||||
buildHRs: (threadRoots) ->
|
buildHRs: (threadRoots) ->
|
||||||
nodes = []
|
nodes = []
|
||||||
for node in threadRoots
|
i = 0
|
||||||
nodes.push node
|
while node = threadRoots[i++]
|
||||||
nodes.push $.el 'hr'
|
nodes.push node, $.el 'hr'
|
||||||
nodes
|
nodes
|
||||||
|
|
||||||
buildReplies: (threads) ->
|
buildReplies: (threads) ->
|
||||||
@ -651,7 +651,9 @@ Index =
|
|||||||
for thread in Index.sortedThreads when !thread.catalogView
|
for thread in Index.sortedThreads when !thread.catalogView
|
||||||
catalogThreads.push new CatalogThread Build.catalogThread(thread), thread
|
catalogThreads.push new CatalogThread Build.catalogThread(thread), thread
|
||||||
Main.callbackNodes CatalogThread, catalogThreads
|
Main.callbackNodes CatalogThread, catalogThreads
|
||||||
Index.sortedThreads.map (thread) -> thread.catalogView.nodes.root
|
nodes = []
|
||||||
|
nodes.push thread.catalogView.nodes.root for thread in Index.sortedThreads
|
||||||
|
return nodes
|
||||||
|
|
||||||
sizeCatalogViews: (nodes) ->
|
sizeCatalogViews: (nodes) ->
|
||||||
# XXX When browsers support CSS3 attr(), use it instead.
|
# XXX When browsers support CSS3 attr(), use it instead.
|
||||||
@ -666,24 +668,32 @@ Index =
|
|||||||
return
|
return
|
||||||
|
|
||||||
sort: ->
|
sort: ->
|
||||||
switch Conf['Index Sort']
|
sortedThreads = []
|
||||||
when 'bump'
|
sortedThreadIDs = []
|
||||||
|
|
||||||
|
{
|
||||||
|
'bump': ->
|
||||||
sortedThreadIDs = Index.liveThreadIDs
|
sortedThreadIDs = Index.liveThreadIDs
|
||||||
when 'lastreply'
|
'lastreply': ->
|
||||||
sortedThreadIDs = [Index.liveThreadData...].sort (a, b) ->
|
liveData = [Index.liveThreadData...].sort (a, b) ->
|
||||||
[..., a] = a.last_replies if 'last_replies' of a
|
[..., a] = a.last_replies if 'last_replies' of a
|
||||||
[..., b] = b.last_replies if 'last_replies' of b
|
[..., b] = b.last_replies if 'last_replies' of b
|
||||||
b.no - a.no
|
b.no - a.no
|
||||||
.map (data) -> data.no
|
sortedThreadIDs.push data.no for data in liveData
|
||||||
when 'birth'
|
return
|
||||||
|
'birth': ->
|
||||||
sortedThreadIDs = [Index.liveThreadIDs...].sort (a, b) -> b - a
|
sortedThreadIDs = [Index.liveThreadIDs...].sort (a, b) -> b - a
|
||||||
when 'replycount'
|
'replycount': ->
|
||||||
sortedThreadIDs = [Index.liveThreadData...].sort((a, b) -> b.replies - a.replies).map (data) -> data.no
|
liveData = [Index.liveThreadData...].sort((a, b) -> b.replies - a.replies)
|
||||||
when 'filecount'
|
sortedThreadIDs.push data.no for data in liveData
|
||||||
sortedThreadIDs = [Index.liveThreadData...].sort((a, b) -> b.images - a.images).map (data) -> data.no
|
return
|
||||||
Index.sortedThreads = sortedThreadIDs
|
'filecount': ->
|
||||||
.map (threadID) -> g.BOARD.threads[threadID]
|
liveData = [Index.liveThreadData...].sort((a, b) -> b.images - a.images)
|
||||||
.filter (thread) -> thread.isHidden is Index.showHiddenThreads
|
sortedThreadIDs.push data.no for data in liveData
|
||||||
|
return
|
||||||
|
}[Conf['Index Sort']]()
|
||||||
|
sortedThreads.push g.BOARD.threads[threadID] for threadID in sortedThreadIDs
|
||||||
|
Index.sortedThreads = sortedThreads.filter (thread) -> thread.isHidden is Index.showHiddenThreads
|
||||||
if Index.isSearching
|
if Index.isSearching
|
||||||
Index.sortedThreads = Index.querySearch(Index.searchInput.value) or Index.sortedThreads
|
Index.sortedThreads = Index.querySearch(Index.searchInput.value) or Index.sortedThreads
|
||||||
# Sticky threads
|
# Sticky threads
|
||||||
@ -707,7 +717,8 @@ Index =
|
|||||||
return
|
return
|
||||||
threadsPerPage = Index.getThreadsNumPerPage()
|
threadsPerPage = Index.getThreadsNumPerPage()
|
||||||
threads = Index.sortedThreads[threadsPerPage * pageNum ... threadsPerPage * (pageNum + 1)]
|
threads = Index.sortedThreads[threadsPerPage * pageNum ... threadsPerPage * (pageNum + 1)]
|
||||||
nodes = threads.map (thread) -> thread.OP.nodes.root.parentNode
|
nodes = []
|
||||||
|
nodes.push thread.OP.nodes.root.parentNode for thread in threads
|
||||||
Index.buildReplies threads
|
Index.buildReplies threads
|
||||||
nodes = Index.buildHRs nodes
|
nodes = Index.buildHRs nodes
|
||||||
Index.buildPagelist()
|
Index.buildPagelist()
|
||||||
@ -716,7 +727,8 @@ Index =
|
|||||||
nodes = Index.buildCatalogViews()
|
nodes = Index.buildCatalogViews()
|
||||||
Index.sizeCatalogViews nodes
|
Index.sizeCatalogViews nodes
|
||||||
else
|
else
|
||||||
nodes = Index.sortedThreads.map (thread) -> thread.OP.nodes.root.parentNode
|
nodes = []
|
||||||
|
nodes.push thread.OP.nodes.root.parentNode for thread in Index.sortedThreads
|
||||||
Index.buildReplies Index.sortedThreads
|
Index.buildReplies Index.sortedThreads
|
||||||
nodes = Index.buildHRs nodes
|
nodes = Index.buildHRs nodes
|
||||||
$.rmAll Index.root unless infinite
|
$.rmAll Index.root unless infinite
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user