Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-04-09 15:16:04 +0300
committerOlivier Paroz <github@oparoz.com>2015-04-09 15:16:04 +0300
commitbb4f0404b41635221f59fea137526caea42b0d44 (patch)
treee3032f587838394c491758dc91daa85a69fc5f76 /js/galleryview.js
parenta182fef1126edb0c3b338ed77dd8547667e79cc6 (diff)
Speed up sorting by only sorting the current album
Diffstat (limited to 'js/galleryview.js')
-rw-r--r--js/galleryview.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/galleryview.js b/js/galleryview.js
index 0182c3ce..ba9548d4 100644
--- a/js/galleryview.js
+++ b/js/galleryview.js
@@ -64,8 +64,16 @@ Gallery.view.viewAlbum = function (albumPath) {
Gallery.currentAlbum = albumPath;
Gallery.view.shareButtonSetup(albumPath);
Gallery.view.infoButtonSetup();
+
Gallery.view.breadcrumb = new Gallery.Breadcrumb(albumPath);
Gallery.view.breadcrumb.setMaxWidth($(window).width() - 320);
+
+ var currentSort = Gallery.albumConfig.getAlbumSorting();
+ Gallery.view.sortControlsSetup(currentSort.type, currentSort.order);
+ Gallery.albumMap[Gallery.currentAlbum].images.sort(Gallery.sortBy(currentSort.type,
+ currentSort.order));
+ Gallery.albumMap[Gallery.currentAlbum].subAlbums.sort(Gallery.sortBy('name',
+ currentSort.albumOrder));
}
Gallery.albumMap[albumPath].viewedItems = 0;