From ff2ace4c89a8483c1ad4a08ccd65ff8b7675ac61 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 21 Aug 2017 16:35:49 +0300 Subject: [PATCH] fixed bug in sort... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/sort.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ui (gen4)/features/sort.js b/ui (gen4)/features/sort.js index 756527b6..6be7c45e 100755 --- a/ui (gen4)/features/sort.js +++ b/ui (gen4)/features/sort.js @@ -122,7 +122,7 @@ module.SortActions = actions.Actions({ // gap and gap length... var gap = -1 - var l = 0 + var l = 1 // XXX add progress reporting... var lst = this.images @@ -148,8 +148,7 @@ module.SortActions = actions.Actions({ }) // rotate index blocks... - // XXX this does not work for lists without a gap -- one item gets pushed to the tail... - if(l > 0){ + if(l > 1){ var tail = lst.splice(gap+1, lst.length) lst = tail.concat(lst) }