mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-16 01:56:55 +00:00
Fix tab-completion duplicates by checking if the emote was added already (#651)
This commit is contained in:
parent
6cb585d7d4
commit
b1d1f98476
1 changed files with 4 additions and 2 deletions
|
@ -554,12 +554,13 @@ export default class Input extends Module {
|
|||
user && user.login,
|
||||
channel_id,
|
||||
channel_login
|
||||
);
|
||||
),
|
||||
added_emotes = new Set();
|
||||
|
||||
for(const set of sets) {
|
||||
if ( set && set.emotes )
|
||||
for(const emote of Object.values(set.emotes))
|
||||
if ( inst.doesEmoteMatchTerm(emote, search) ) {
|
||||
if ( inst.doesEmoteMatchTerm(emote, search) && !added_emotes.has(emote.name) ) {
|
||||
const favorite = this.emotes.isFavorite(set.source || 'ffz', emote.id);
|
||||
results.push({
|
||||
current: input,
|
||||
|
@ -572,6 +573,7 @@ export default class Input extends Module {
|
|||
}),
|
||||
favorite
|
||||
});
|
||||
added_emotes.add(emote.name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue