Handle swipe-deleted expression refresh and add zh-cn display strings

This commit is contained in:
Tremendoussly
2026-04-14 17:43:57 +02:00
parent 2ee081a619
commit 60c430919b
2 changed files with 18 additions and 1 deletions
+9
View File
@@ -1486,6 +1486,15 @@ jQuery(async () => {
clearThoughtBasedExpressionsCache();
setTimeout(() => onThoughtBasedExpressionsChatChanged(), 0);
});
eventSource.on(event_types.MESSAGE_SWIPE_DELETED, () => {
if (!extensionSettings.enabled) {
return;
}
clearThoughtBasedExpressionsCache();
setTimeout(() => onThoughtBasedExpressionsChatChanged(), 0);
});
} catch (error) {
console.error('[RPG Companion] Event registration failed:', error);
throw error; // This is critical - can't continue without events