fixed a bug with sorting...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-01-13 11:21:49 +04:00
parent 7f71d093b7
commit e5127b85bc
3 changed files with 11 additions and 0 deletions

View File

@ -160,6 +160,7 @@ function setupBookmarks(viewer){
return viewer return viewer
.on('sortedImages', function(){ .on('sortedImages', function(){
BOOKMARKS = fastSortGIDsByOrder(BOOKMARKS) BOOKMARKS = fastSortGIDsByOrder(BOOKMARKS)
bookmarksUpdated()
}) })
} }
SETUP_BINDINGS.push(setupBookmarks) SETUP_BINDINGS.push(setupBookmarks)

View File

@ -738,6 +738,10 @@ function setupMarks(viewer){
viewer.trigger('togglingMark', [gid, action]) viewer.trigger('togglingMark', [gid, action])
}) })
}) })
.on('sortedImages', function(){
MARKED = fastSortGIDsByOrder(MARKED)
marksUpdated()
})
.on('baseURLChanged', function(){ .on('baseURLChanged', function(){
invalidateMarksCache() invalidateMarksCache()
}) })

View File

@ -531,6 +531,12 @@ function setupUnsortedTagHandler(viewer){
untagList(gids, UNSORTED_TAG) untagList(gids, UNSORTED_TAG)
} }
}) })
.on('sortedImages', function(){
for(var tag in TAGS){
TAGS[tag] = fastSortGIDsByOrder(TAGS[tag])
}
tagsUpdated()
})
} }
SETUP_BINDINGS.push(setupUnsortedTagHandler) SETUP_BINDINGS.push(setupUnsortedTagHandler)