From 44368d9f781f5c645bbba83033438cd08e9a1282 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 28 Nov 2016 02:37:57 +0300 Subject: [PATCH] cleanup... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/history.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ui (gen4)/features/history.js b/ui (gen4)/features/history.js index ad4b9acb..66e29401 100755 --- a/ui (gen4)/features/history.js +++ b/ui (gen4)/features/history.js @@ -462,7 +462,13 @@ var URLHistoryUIActions = actions.Actions({ // pinned items... history .filter(function(p){ - return that.url_history[p].pinned + // NOTE: yes direct access is faster, but + // calling the toggler (common API) here + // will isolate the level knowledge to a + // single point which will simplify things + // if anything changes... + //return that.url_history[p].pinned + return that.toggleURLPinned(p, '?') == 'on' }) .forEach(function(p){ // prevent from drawing again... @@ -515,7 +521,6 @@ var URLHistoryUIActions = actions.Actions({ // pin to top... // XXX should this be standard functionality??? // XXX should this .setTopURLHistory(..)??? - // XXX should we get pinned state via .toggleURLPinned(url, '?') here??? ['' +'', function(p){ @@ -528,13 +533,11 @@ var URLHistoryUIActions = actions.Actions({ // pinned... if(cur.hasClass('pinned')){ cur.removeClass('pinned') - //delete that.url_history[p].pinned that.toggleURLPinned(p, 'off') // not pinned... } else { cur.addClass('pinned') - //that.url_history[p].pinned = true that.toggleURLPinned(p, 'on') }