diff options
author | Olivier Paroz <github@oparoz.com> | 2015-07-08 01:09:36 +0300 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-07-10 18:33:18 +0300 |
commit | d51a28e552070acdfc9e8a56011d9204d539d0d3 (patch) | |
tree | a8d7bbc70bc035f5fc33f5ff4dae4aff01ec5194 /js/galleryview.js | |
parent | 005029d7a5e258dbf010706e181fba2d006de76a (diff) |
Fix album mapping by using a new caching mechanism
We were still partially using the old caching mechanism used to map the entire filesystem before loading anything. This led to holes in the mapping as well as lots of redundant an partial information being stored.
This new approach is custom made and can probably still be improved
Fixes #206
Diffstat (limited to 'js/galleryview.js')
-rw-r--r-- | js/galleryview.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/galleryview.js b/js/galleryview.js index 502c22db..55cfff75 100644 --- a/js/galleryview.js +++ b/js/galleryview.js @@ -31,9 +31,10 @@ * @param {string} albumPath */ init: function (albumPath) { - if (Gallery.images.length === 0) { + if ($.isEmptyObject(Gallery.imageMap)) { //Gallery.showEmpty(); // FIXME Make the diff between a root and deep folder + this.clear(); Gallery.showEmptyFolder(); Gallery.currentAlbum = albumPath; this.breadcrumb = new Gallery.Breadcrumb(albumPath); |