From 9c81b6e459edacdd1da1e6d771badde7a85c6442 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Fri, 1 Nov 2013 18:40:36 +0100 Subject: [PATCH] Put the stickies on top of the index. --- src/Miscellaneous/Index.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Miscellaneous/Index.coffee b/src/Miscellaneous/Index.coffee index cdb74fe63..16fef5eaa 100644 --- a/src/Miscellaneous/Index.coffee +++ b/src/Miscellaneous/Index.coffee @@ -161,6 +161,10 @@ Index = for threadID in sortedThreadIDs i = Index.liveThreadIDs.indexOf(threadID) * 2 Index.sortedNodes.push Index.nodes[i], Index.nodes[i + 1] + # Put the sticky threads on top of the index.g + offset = 0 + for threadRoot, i in Index.sortedNodes by 2 when Get.threadFromRoot(threadRoot).isSticky + Index.sortedNodes.splice offset++ * 2, 0, Index.sortedNodes.splice(i, 2)... return unless Conf['Filter'] # Put the highlighted thread &
on top of the index # while keeping the original order they appear in.