From 2c67f3b394725cd7c49f754d5fc55c4adbdfd542 Mon Sep 17 00:00:00 2001 From: "Yasmin Seidel (JasminDreasond)" Date: Thu, 10 Aug 2023 23:17:29 -0300 Subject: [PATCH] trying to fix emoji board --- src/app/molecules/image-pack/ImagePack.jsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/app/molecules/image-pack/ImagePack.jsx b/src/app/molecules/image-pack/ImagePack.jsx index cbab1a667..e2c30d7f6 100644 --- a/src/app/molecules/image-pack/ImagePack.jsx +++ b/src/app/molecules/image-pack/ImagePack.jsx @@ -141,12 +141,14 @@ function useImagePackHandles(pack, sendPackContent) { sendPackContent(pack.getContent()); forceUpdate(); }; + const handleEditProfile = (name, attribution) => { pack.setDisplayName(name); pack.setAttribution(attribution); sendPackContent(pack.getContent()); forceUpdate(); }; + const handleUsageChange = (newUsage) => { const usage = []; if (newUsage === 'emoticon' || newUsage === 'both') usage.push('emoticon'); @@ -166,7 +168,12 @@ function useImagePackHandles(pack, sendPackContent) { sendPackContent(pack.getContent()); forceUpdate(); + + const roomData = getSelectRoom(); + updateEmojiList(roomData && roomData.roomId ? roomData.roomId : undefined); + }; + const handleDeleteItem = async (key) => { const isConfirmed = await confirmDialog( 'Delete', @@ -184,6 +191,7 @@ function useImagePackHandles(pack, sendPackContent) { updateEmojiList(roomData && roomData.roomId ? roomData.roomId : undefined); }; + const handleUsageItem = (key, newUsage) => { const usage = []; if (newUsage === 'emoticon' || newUsage === 'both') usage.push('emoticon'); @@ -193,6 +201,7 @@ function useImagePackHandles(pack, sendPackContent) { sendPackContent(pack.getContent()); forceUpdate(); }; + const handleAddItem = (key, url) => { const newKey = getNewKey(key); if (!newKey || !url) return; @@ -202,6 +211,10 @@ function useImagePackHandles(pack, sendPackContent) { }); sendPackContent(pack.getContent()); + + const roomData = getSelectRoom(); + updateEmojiList(roomData && roomData.roomId ? roomData.roomId : undefined); + forceUpdate(); };