diff --git a/dist/index.js b/dist/index.js index 861862ab..9887b88a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -880,6 +880,10 @@ function remove() { chat.deleteMessage(message); } + const messageBody = createProxyState( + [chat.messages], + () => message.body + ); return /* @__PURE__ */ createElement("div", { class: "tile width-100 flex-no padding-0" }, /* @__PURE__ */ createElement("div", { class: "flex-column" }, /* @__PURE__ */ createElement("div", { class: "flex-row justify-apart align-center secondary" }, /* @__PURE__ */ createElement("span", { class: "padding-h ellipsis" }, /* @__PURE__ */ createElement("b", { class: "info" }, message.sender), " - ", message.channel), /* @__PURE__ */ createElement("span", { class: "flex-row" }, /* @__PURE__ */ createElement( "button", { @@ -894,7 +898,7 @@ "on:click": decrypt2 }, /* @__PURE__ */ createElement("span", { class: "icon" }, "key") - ), /* @__PURE__ */ createElement("button", { "aria-label": translation.deleteMessage, "on:click": remove }, /* @__PURE__ */ createElement("span", { class: "icon" }, "delete")))), /* @__PURE__ */ createElement("div", { class: "flex-column padding-h padding-bottom" }, /* @__PURE__ */ createElement("b", { class: "break-word" }, message.body), /* @__PURE__ */ createElement("span", { class: "secondary" }, new Date(message.isoDate).toLocaleString())))); + ), /* @__PURE__ */ createElement("button", { "aria-label": translation.deleteMessage, "on:click": remove }, /* @__PURE__ */ createElement("span", { class: "icon" }, "delete")))), /* @__PURE__ */ createElement("div", { class: "flex-column padding-h padding-bottom" }, /* @__PURE__ */ createElement("b", { class: "break-word", "subscribe:innerText": messageBody }), /* @__PURE__ */ createElement("span", { class: "secondary" }, new Date(message.isoDate).toLocaleString())))); }; return /* @__PURE__ */ createElement( "div", diff --git a/src/Views/threadView.tsx b/src/Views/threadView.tsx index c893fc78..38d6786f 100644 --- a/src/Views/threadView.tsx +++ b/src/Views/threadView.tsx @@ -18,6 +18,11 @@ export function ThreadView(chat: Chat) { chat.deleteMessage(message); } + const messageBody = React.createProxyState( + [chat.messages], + () => message.body + ); + return (