summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authoranoy <anoymouserver+github@mailbox.org>2020-11-09 11:41:34 +0100
committerBenjamin Brahmer <info@b-brahmer.de>2020-11-09 16:58:44 +0100
commit112cc727ea3f026f5ec7c19120fe6eb87d90f732 (patch)
tree2bf588cccc465a23aeeca65274af87bfada467bf /js
parent47ab9f38c4e2fc732741a0303811ef9ea14bd163 (diff)
add locale-aware sorting for folders and feeds
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
Diffstat (limited to 'js')
-rw-r--r--js/controller/NavigationController.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/controller/NavigationController.js b/js/controller/NavigationController.js
index 7467acffa..1b183cbdf 100644
--- a/js/controller/NavigationController.js
+++ b/js/controller/NavigationController.js
@@ -406,4 +406,11 @@ app.controller('NavigationController', function ($route, FEED_TYPE, FeedResource
setSelectedFolderForRoute();
});
+ $rootScope.localeComparator = function(v1, v2) {
+ if (v1.type === 'string' && v2.type === 'string') {
+ return v1.value.localeCompare(v2.value);
+ }
+
+ return (v1.value === v2.value) ? 0 : ((v1.value < v2.value) ? -1 : 1);
+ };
});