mirror of
https://github.com/laurent22/joplin.git
synced 2025-03-11 14:09:55 +02:00
All: Sort tags in a case-insensitive way
This commit is contained in:
parent
06f73919bd
commit
537336754c
@ -51,7 +51,10 @@ shared.renderFolders = function(props, renderItem) {
|
||||
shared.renderTags = function(props, renderItem) {
|
||||
const tags = props.tags.slice();
|
||||
tags.sort((a, b) => {
|
||||
return a.title < b.title ? -1 : +1;
|
||||
// Note: while newly created tags are normalized and lowercase
|
||||
// imported tags might be any case, so we need to do case-insensitive
|
||||
// sort.
|
||||
return a.title.toLowerCase() < b.title.toLowerCase() ? -1 : +1;
|
||||
});
|
||||
const tagItems = [];
|
||||
const order = [];
|
||||
@ -66,21 +69,6 @@ shared.renderTags = function(props, renderItem) {
|
||||
};
|
||||
};
|
||||
|
||||
// shared.renderSearches = function(props, renderItem) {
|
||||
// let searches = props.searches.slice();
|
||||
// let searchItems = [];
|
||||
// const order = [];
|
||||
// for (let i = 0; i < searches.length; i++) {
|
||||
// const search = searches[i];
|
||||
// order.push(search.id);
|
||||
// searchItems.push(renderItem(search, props.selectedSearchId == search.id && props.notesParentType == 'Search'));
|
||||
// }
|
||||
// return {
|
||||
// items: searchItems,
|
||||
// order: order,
|
||||
// };
|
||||
// }
|
||||
|
||||
shared.synchronize_press = async function(comp) {
|
||||
const { reg } = require('lib/registry.js');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user