@bobfrankston/rmfmail 1.1.159 → 1.1.161

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.
@@ -1474,7 +1474,8 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
1474
1474
  references: cm.references || [],
1475
1475
  accounts: [],
1476
1476
  draftUid: cm.uid,
1477
- draftFolderId: cm.folderId
1477
+ draftFolderId: cm.folderId,
1478
+ draftId: cm.mailxDraftId || ""
1478
1479
  };
1479
1480
  sessionStorage.setItem("composeInit", JSON.stringify(init));
1480
1481
  document.dispatchEvent(new CustomEvent("mailx-compose", { detail: { mode: "draft" } }));
@@ -2127,8 +2128,10 @@ ${csp}
2127
2128
  function popOutCurrentMessage() {
2128
2129
  if (!currentMessage)
2129
2130
  return;
2131
+ const isAndroid = window.mailxapi?.platform === "android";
2132
+ const isCoarse = !!window.matchMedia?.("(pointer: coarse)")?.matches;
2130
2133
  const isNarrow = window.innerWidth <= 768;
2131
- if (isNarrow) {
2134
+ if (isAndroid || isCoarse || isNarrow) {
2132
2135
  document.body.classList.toggle("viewer-fullscreen");
2133
2136
  return;
2134
2137
  }
@@ -3427,9 +3430,10 @@ var init_message_list = __esm({
3427
3430
  subject.prepend(threadPill);
3428
3431
  }
3429
3432
  if (msg.preview) {
3433
+ const cleaned = msg.preview.replace(/data:image\/[a-z0-9.+-]+;base64,[A-Za-z0-9+/=\s]+/gi, "[image]").replace(/[A-Za-z0-9+/=]{200,}/g, "[image]");
3430
3434
  const preview = document.createElement("span");
3431
3435
  preview.className = "ml-preview";
3432
- preview.textContent = ` \u2014 ${msg.preview}`;
3436
+ preview.textContent = ` \u2014 ${cleaned}`;
3433
3437
  subject.appendChild(preview);
3434
3438
  }
3435
3439
  const date = document.createElement("span");
@@ -10408,7 +10412,8 @@ document.addEventListener("mailx-popout-message", (async (e) => {
10408
10412
  references: msg.references || [],
10409
10413
  accounts: accts.map((a) => ({ id: a.id, name: a.name, email: a.email, signature: a.signature, sig: a.sig })),
10410
10414
  draftUid: msg.uid,
10411
- draftFolderId: msg.folderId
10415
+ draftFolderId: msg.folderId,
10416
+ draftId: msg.mailxDraftId || ""
10412
10417
  };
10413
10418
  sessionStorage.setItem("composeInit", JSON.stringify(init));
10414
10419
  showComposeOverlay(msg.subject ? `Edit: ${msg.subject}` : "Edit draft");