mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Revert "Merge pull request #1609 from MrDowntempo/feat/All-Emojis"
This reverts commit1bc8c0a9e8, reversing changes made to6bdbf6903b.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user