mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-01 23:48:31 +00:00
4.6.1
* Fixed: Sort emotes in the tab-completion list using similar logic to vanilla Twitch. * Changed: When the tab-completion list is limited to 25 entries, stop looking up further entries if we already have 25 or more.
This commit is contained in:
parent
92f5b7f2c9
commit
c8c2afac20
2 changed files with 8 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "frankerfacez",
|
"name": "frankerfacez",
|
||||||
"author": "Dan Salvato LLC",
|
"author": "Dan Salvato LLC",
|
||||||
"version": "4.6.0",
|
"version": "4.6.1",
|
||||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -212,17 +212,21 @@ export default class Input extends Module {
|
||||||
|
|
||||||
inst.getMatchedEmotes = function(input) {
|
inst.getMatchedEmotes = function(input) {
|
||||||
const limitResults = t.chat.context.get('chat.tab-complete.limit-results');
|
const limitResults = t.chat.context.get('chat.tab-complete.limit-results');
|
||||||
|
|
||||||
let results = t.getTwitchEmoteSuggestions(input, this);
|
let results = t.getTwitchEmoteSuggestions(input, this);
|
||||||
|
if ( limitResults && results.length >= 25 )
|
||||||
|
return results.slice(0, 25);
|
||||||
|
|
||||||
if ( t.chat.context.get('chat.tab-complete.ffz-emotes') ) {
|
if ( t.chat.context.get('chat.tab-complete.ffz-emotes') ) {
|
||||||
const ffz_emotes = t.getEmoteSuggestions(input, this);
|
const ffz_emotes = t.getEmoteSuggestions(input, this);
|
||||||
if ( Array.isArray(ffz_emotes) && ffz_emotes.length )
|
if ( Array.isArray(ffz_emotes) && ffz_emotes.length )
|
||||||
results = Array.isArray(results) ? results.concat(ffz_emotes) : ffz_emotes;
|
results = results.concat(ffz_emotes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( limitResults && results.length >= 25 )
|
||||||
|
return results.slice(0, 25);
|
||||||
|
|
||||||
if ( ! t.chat.context.get('chat.tab-complete.emoji') )
|
if ( ! t.chat.context.get('chat.tab-complete.emoji') )
|
||||||
return limitResults && results.length > 25 ? results.slice(0, 25) : results;
|
return results;
|
||||||
|
|
||||||
const emoji = t.getEmojiSuggestions(input, this);
|
const emoji = t.getEmojiSuggestions(input, this);
|
||||||
if ( Array.isArray(emoji) && emoji.length )
|
if ( Array.isArray(emoji) && emoji.length )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue