Revert "Merge pull request #1609 from MrDowntempo/feat/All-Emojis"

This reverts commit 1bc8c0a9e8, reversing
changes made to 6bdbf6903b.
This commit is contained in:
Lemmy
2026-01-28 18:58:19 -05:00
parent 1bc8c0a9e8
commit a1ebd660bf
3 changed files with 54 additions and 54 deletions
+15 -15
View File
@@ -27,23 +27,23 @@ Singleton {
if (!query || query.trim() === "") {
// Return popular/recently used emojis, fallback to all emojis sorted by usage
return emojis;
return _getPopularEmojis(50);
}
const terms = query.toLowerCase().split(" ").filter(t => t);
const results = emojis.filter(emoji => {
for (let term of terms) {
const emojiMatch = emoji.emoji.toLowerCase().includes(term);
const nameMatch = emoji.name.toLowerCase().includes(term);
const keywordMatch = emoji.keywords.some(kw => kw.toLowerCase().includes(term));
const categoryMatch = emoji.category.toLowerCase().includes(term);
for (let term of terms) {
const emojiMatch = emoji.emoji.toLowerCase().includes(term);
const nameMatch = emoji.name.toLowerCase().includes(term);
const keywordMatch = emoji.keywords.some(kw => kw.toLowerCase().includes(term));
const categoryMatch = emoji.category.toLowerCase().includes(term);
if (!emojiMatch && !nameMatch && !keywordMatch && !categoryMatch) {
return false;
}
}
return true;
});
if (!emojiMatch && !nameMatch && !keywordMatch && !categoryMatch) {
return false;
}
}
return true;
});
return results;
}
@@ -97,9 +97,9 @@ Singleton {
var categories = [];
for (var cat in categoryCounts) {
categories.push({
name: cat,
count: categoryCounts[cat]
});
name: cat,
count: categoryCounts[cat]
});
}
return categories;