@bobfrankston/rmfmail 1.1.107 → 1.1.108

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.
@@ -21,6 +21,7 @@ __export(api_client_exports, {
21
21
  allowRemoteContent: () => allowRemoteContent,
22
22
  autocomplete: () => autocomplete,
23
23
  cancelQueuedOutgoing: () => cancelQueuedOutgoing,
24
+ cancelServerSearch: () => cancelServerSearch,
24
25
  closeWordEdit: () => closeWordEdit,
25
26
  connectEvents: () => connectEvents,
26
27
  connectWebSocket: () => connectWebSocket,
@@ -194,6 +195,9 @@ function getUnifiedInbox(page = 1, pageSize = 50) {
194
195
  function searchMessages(query, page = 1, pageSize = 50, scope = "all", accountId = "", folderId = 0, includeTrashSpam = false) {
195
196
  return ipc().searchMessages(query, page, pageSize, scope, accountId, folderId, includeTrashSpam);
196
197
  }
198
+ function cancelServerSearch() {
199
+ return ipc().cancelServerSearch?.();
200
+ }
197
201
  function getMessage(accountId, uid, allowRemote = false, folderId) {
198
202
  return ipc().getMessage(accountId, uid, allowRemote, folderId);
199
203
  }
@@ -7418,14 +7422,14 @@ function quoteBody(msg) {
7418
7422
  const date = new Date(msg.date).toLocaleString();
7419
7423
  const from = msg.from.name ? `${msg.from.name} <${msg.from.address}>` : msg.from.address;
7420
7424
  const body = sanitizeQuotedBody(msg);
7421
- return `<p><br></p><div class="reply"><p>On ${date}, ${from} wrote:</p><blockquote>${body}</blockquote></div>`;
7425
+ return `<p></p><br><br><div class="reply"><p>On ${date}, ${from} wrote:</p><blockquote>${body}</blockquote></div>`;
7422
7426
  }
7423
7427
  function forwardBody(msg) {
7424
7428
  const date = new Date(msg.date).toLocaleString();
7425
7429
  const from = msg.from.name ? `${msg.from.name} &lt;${msg.from.address}&gt;` : msg.from.address;
7426
7430
  const to = msg.to.map((a) => a.name ? `${a.name} &lt;${a.address}&gt;` : a.address).join(", ");
7427
7431
  const body = sanitizeQuotedBody(msg);
7428
- return `<p><br></p><div class="reply"><p>---------- Forwarded message ----------<br>From: ${from}<br>Date: ${date}<br>Subject: ${msg.subject}<br>To: ${to}</p>${body}</div>`;
7432
+ return `<p></p><br><br><div class="reply"><p>---------- Forwarded message ----------<br>From: ${from}<br>Date: ${date}<br>Subject: ${msg.subject}<br>To: ${to}</p>${body}</div>`;
7429
7433
  }
7430
7434
  var lastDeleted = null;
7431
7435
  var lastMoved = null;
@@ -7962,6 +7966,7 @@ function doSearch(immediate = false) {
7962
7966
  clearTimeout(serverSearchTimer);
7963
7967
  serverSearchTimer = null;
7964
7968
  }
7969
+ cancelServerSearch();
7965
7970
  if (localScope === "current" && !serverOn && !immediate) {
7966
7971
  const body = document.getElementById("ml-body");
7967
7972
  if (body) {
@@ -7996,6 +8001,7 @@ searchInput?.addEventListener("input", () => {
7996
8001
  if (serverSearchTimer) {
7997
8002
  clearTimeout(serverSearchTimer);
7998
8003
  serverSearchTimer = null;
8004
+ cancelServerSearch();
7999
8005
  }
8000
8006
  updateSearchHighlight();
8001
8007
  if (searchInput.value.trim() === "") {
@@ -8019,6 +8025,7 @@ searchInput?.addEventListener("keydown", (e) => {
8019
8025
  clearTimeout(serverSearchTimer);
8020
8026
  serverSearchTimer = null;
8021
8027
  }
8028
+ cancelServerSearch();
8022
8029
  updateSearchHighlight();
8023
8030
  clearSearchMode();
8024
8031
  const body = document.getElementById("ml-body");
@@ -9869,6 +9876,10 @@ getSettings().then((s) => {
9869
9876
  }).catch(() => {
9870
9877
  });
9871
9878
  function saveEditorSetting(editor) {
9879
+ try {
9880
+ localStorage.setItem("mailx-editor-type", editor);
9881
+ } catch {
9882
+ }
9872
9883
  getSettings().then((settings) => {
9873
9884
  settings.ui = { ...settings.ui, editor };
9874
9885
  saveSettings(settings);