revert lodash upgrade, it is causing severe breakages elsewhere
This commit is contained in:
parent
80d8b133d9
commit
5ddec2e76d
|
@ -81,8 +81,18 @@ var trackEmojiUsage = function(title){
|
||||||
var initializeRecentlyUsedIcons = function(){
|
var initializeRecentlyUsedIcons = function(){
|
||||||
recentlyUsedIcons = [];
|
recentlyUsedIcons = [];
|
||||||
|
|
||||||
var usage = JSON.parse(localStorage.emojiUsage);
|
var usage = _.map(JSON.parse(localStorage.emojiUsage));
|
||||||
var recent = _.take(_.sortByAll(usage, ["usage", "title"]).reverse(), PER_ROW);
|
usage.sort(function(a,b){
|
||||||
|
if(a.usage > b.usage){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if(b.usage > a.usage){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return a.title.localeCompare(b.title);
|
||||||
|
});
|
||||||
|
|
||||||
|
var recent = _.take(usage, PER_ROW);
|
||||||
|
|
||||||
if(recent.length > 0){
|
if(recent.length > 0){
|
||||||
_.each(recent, function(emoji){
|
_.each(recent, function(emoji){
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue