From b3d80100ddae0c2b3eaee10327976abf938d546c Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 4 Jan 2017 16:41:46 +0300 Subject: [PATCH] tweaking... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/history.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ui (gen4)/features/history.js b/ui (gen4)/features/history.js index 924b0a1c..02f84109 100755 --- a/ui (gen4)/features/history.js +++ b/ui (gen4)/features/history.js @@ -549,10 +549,11 @@ var URLHistoryUIActions = actions.Actions({ // move to top... ['♦', function(p){ - // XXX this is a tad slower, is "simpler" worth it? - //that.setTopURLHistory(p) - //o.redraw() + that.setTopURLHistory(p) + o.redraw(p) + /* XXX this is a tad faster, is the added + // complexity worth it?? var cur = this.filter('"'+p+'"', false) var top = cur.hasClass('pinned') ? @@ -564,6 +565,7 @@ var URLHistoryUIActions = actions.Actions({ top.before(cur) that.setTopURLHistory(p) } + //*/ }], // pin to top... // XXX should this be standard functionality??? @@ -636,10 +638,13 @@ var URLHistoryUIActions = actions.Actions({ // because this will only change positions of a view dom // elements while .update(..) will redraw the while thing... // NOTE: this also uses fs_state for caching... - o.redraw = function(){ + o.redraw = function(path){ var list = o.dom.find('.list') makeHistoryList(fs_state) .forEach(function(elem, i){ + if(path && path != elem[0]){ + return + } // move... if(list.children().eq(i).attr('path') != elem[0]){ list.children().eq(i)