@bobfrankston/rmfmail 1.2.220 → 1.2.221

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1611,8 +1611,8 @@ function readConfigHelp(name) {
1611
1611
  function unsubscribeOneClick(url) {
1612
1612
  return ipc().unsubscribeOneClick?.(url);
1613
1613
  }
1614
- function openInWord(editId, html) {
1615
- return ipc().openInWord?.(editId, html) ?? Promise.resolve({ ok: false, path: "", opener: "none" });
1614
+ function openInWord(editId, html, fromPopout = false) {
1615
+ return ipc().openInWord?.(editId, html, fromPopout) ?? Promise.resolve({ ok: false, path: "", opener: "none" });
1616
1616
  }
1617
1617
  function closeWordEdit(editId) {
1618
1618
  return ipc().closeWordEdit?.(editId) ?? Promise.resolve();
@@ -6229,7 +6229,7 @@ document.getElementById("btn-edit-in-word")?.addEventListener("click", async ()
6229
6229
  if (!wordEditId) wordEditId = `compose-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
6230
6230
  showDraftStatus("Opening in Word\u2026", false);
6231
6231
  try {
6232
- const result = await openInWord(wordEditId, editor.getHtml());
6232
+ const result = await openInWord(wordEditId, editor.getHtml(), !!popoutInitId);
6233
6233
  if (!result.ok || result.opener === "none") {
6234
6234
  showDraftStatus("Couldn't launch an editor. Install Word, LibreOffice, or set a default for .html.", true);
6235
6235
  return;
@@ -6381,6 +6381,12 @@ onEvent((ev) => {
6381
6381
  showDraftStatus(`Reload failed: ${e?.message || e}`, true);
6382
6382
  }
6383
6383
  });
6384
+ onEvent((ev) => {
6385
+ if (ev?.type !== "wordEditClosed") return;
6386
+ if (!wordEditId || ev.editId !== wordEditId) return;
6387
+ extEditHintClose?.();
6388
+ showDraftStatus("Word closed \u2014 edits are in the message.", false);
6389
+ });
6384
6390
  window.addEventListener("beforeunload", () => {
6385
6391
  if (wordEditId) closeWordEdit(wordEditId).catch(() => {
6386
6392
  });