Don't classify when no sprites/default. H-center sprite in non-waifu mode

This commit is contained in:
Cohee
2023-09-18 01:49:00 +03:00
parent 43de36b331
commit e9c459690f
2 changed files with 7 additions and 0 deletions

View File

@ -566,6 +566,11 @@ async function moduleWorker() {
offlineMode.css('display', 'none');
}
// Don't bother classifying if current char has no sprites and no default expressions are enabled
if (spriteCache[spriteFolderName].length === 0 && !extension_settings.expressions.showDefault) {
return;
}
// check if last message changed
if ((lastCharacter === context.characterId || lastCharacter === context.groupId)
&& lastMessage === currentLastMessage.mes) {
@ -574,6 +579,7 @@ async function moduleWorker() {
// API is busy
if (inApiCall) {
console.debug('Classification API is busy');
return;
}