From 25a9af7212d757a53258990668620157c8ebe2e5 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 25 Sep 2020 09:22:44 +0200 Subject: viewer/services/itemComparators: set default item sort order to date_asc It's the most reasonable default that doesn't break the order of sequence of photos. --- viewer/ldgallery-viewer.7.md | 2 +- viewer/src/services/itemComparators.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'viewer') diff --git a/viewer/ldgallery-viewer.7.md b/viewer/ldgallery-viewer.7.md index 6b31879..96070dc 100644 --- a/viewer/ldgallery-viewer.7.md +++ b/viewer/ldgallery-viewer.7.md @@ -77,7 +77,7 @@ galleryIndex initialItemSort : Order in which gallery items are originally to be displayed. Possible values are "title_asc", "date_asc", "date_desc". - Defaults to "title_asc". + Defaults to "date_asc". Titles are sorted using a human-friendly _natural sort order_ which treats multi-digit numbers atomically. The item path is used as a tie-breaker for all the defined orders. diff --git a/viewer/src/services/itemComparators.ts b/viewer/src/services/itemComparators.ts index ab1036d..82757ca 100644 --- a/viewer/src/services/itemComparators.ts +++ b/viewer/src/services/itemComparators.ts @@ -41,7 +41,7 @@ export default class ItemComparators { }, ]; - static readonly DEFAULT = ItemComparators.ITEM_SORTS[0].fn; + static readonly DEFAULT = ItemComparators.ITEM_SORTS[1].fn; static sortByPathAsc(left: Gallery.Item, right: Gallery.Item): number { return left.path.localeCompare(right.path, undefined, { -- cgit v1.2.3