diff --git a/ReactNativeClient/lib/components/shared/side-menu-shared.js b/ReactNativeClient/lib/components/shared/side-menu-shared.js index 5de8d7675f..6c1cb953c5 100644 --- a/ReactNativeClient/lib/components/shared/side-menu-shared.js +++ b/ReactNativeClient/lib/components/shared/side-menu-shared.js @@ -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');