From a12ac31d17af7a1d3d363dbdf5904c67b6aa8649 Mon Sep 17 00:00:00 2001 From: wibus-wee <1596355173@qq.com> Date: Wed, 5 Jul 2023 15:49:01 +0800 Subject: [PATCH] fix: image cannot be clicked to enlarge This is a temporary change, I will finish the task of #16 in the future --- src/functions/better-image-display.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/functions/better-image-display.ts b/src/functions/better-image-display.ts index e7642ff..5a28c62 100644 --- a/src/functions/better-image-display.ts +++ b/src/functions/better-image-display.ts @@ -56,6 +56,10 @@ export function betterImageDisplay(messageUserList: IMessageUserList) { ${timestamp.split(":").slice(0, 2).join(":")} `; + // Thanks to @dmlgzs for this fix: https://github.com/wibus-wee/icalingua-theme-telegram/issues/21#issuecomment-1621200630 + newMessageImageContainer.onclick = () => { + require('electron').ipcRenderer.send('openImage', messageImageSrc); + }; ( messageElement.querySelector( ".vac-message-container .vac-message-card"