[fix] emotion not reloading

This commit is contained in:
kwaroran
2023-05-07 15:44:47 +09:00
parent dbbd409775
commit d9f7369bb2

View File

@@ -17,7 +17,7 @@
let subMenu = 0
let subberMenu = 0
let emos:[string, string][] = []
let tokens = {
desc: 0,
firstMsg: 0,
@@ -119,13 +119,18 @@
}
}
}
emos = currentChar.data.emotionImages
})
$: {
if(database.characters[$selectedCharID].chaId === currentChar.data.chaId){
database.characters[$selectedCharID] = currentChar.data
}
else{
loadTokenize(currentChar.data)
}
emos = currentChar.data.emotionImages
DataBase.set(database)
}
@@ -252,8 +257,8 @@
<tr>
<div class="text-gray-500">{language.noImages}</div>
</tr>
{/if}
{#each currentChar.data.emotionImages as emo, i}
{:else}
{#each emos as emo, i}
<tr>
{#await getCharImage(emo[1], 'plain')}
<td class="font-medium truncate w-1/3"></td>
@@ -268,6 +273,7 @@
}}><TrashIcon /></button>
</tr>
{/each}
{/if}
</table>
<div class="text-gray-500 hover:text-neutral-200 mt-2 flex">