aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/services
diff options
context:
space:
mode:
authorZero~Informatique2020-09-12 06:34:58 +0200
committerG.Fouet2020-09-12 23:19:44 +0200
commit96ed5e6583a7f03d4ea7fa0512e66fffb656cc6e (patch)
tree7df81984c78d616bff317be25f99c7c2d02286c8 /viewer/src/services
parent7a8eba922ad34182628f80cf2496d8654abe91e6 (diff)
downloadldgallery-96ed5e6583a7f03d4ea7fa0512e66fffb656cc6e.tar.gz
viewer: make default sort order configurable
github: resolves #239
Diffstat (limited to 'viewer/src/services')
-rw-r--r--viewer/src/services/itemComparators.ts (renamed from viewer/src/services/itemSortFn.ts)4
1 files changed, 3 insertions, 1 deletions
diff --git a/viewer/src/services/itemSortFn.ts b/viewer/src/services/itemComparators.ts
index a7e0883..c8fedbe 100644
--- a/viewer/src/services/itemSortFn.ts
+++ b/viewer/src/services/itemComparators.ts
@@ -17,7 +17,9 @@
17-- along with this program. If not, see <https://www.gnu.org/licenses/>. 17-- along with this program. If not, see <https://www.gnu.org/licenses/>.
18*/ 18*/
19 19
20export default class ItemSortFn { 20export type ItemComparator = (left: Gallery.Item, right: Gallery.Item) => number;
21
22export default class ItemComparators {
21 static sortByNameAsc(left: Gallery.Item, right: Gallery.Item): number { 23 static sortByNameAsc(left: Gallery.Item, right: Gallery.Item): number {
22 return left.title.localeCompare(right.title); 24 return left.title.localeCompare(right.title);
23 } 25 }