@bobfrankston/rmfmail 1.0.696 → 1.0.697

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.
@@ -998,10 +998,11 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
998
998
  } catch {
999
999
  }
1000
1000
  if (!cachedMsg) {
1001
- bodyEl.innerHTML = `<div class="mv-preview-placeholder">${escapeHtml(cached.preview || "")}</div>`;
1001
+ const previewText = (cached.preview || "").trim();
1002
+ bodyEl.innerHTML = previewText ? `<div class="mv-preview-placeholder">${escapeHtml(previewText)}</div>` : `<div class="mv-empty">Loading body\u2026</div>`;
1002
1003
  }
1003
1004
  } else if (!cachedMsg) {
1004
- bodyEl.innerHTML = "";
1005
+ bodyEl.innerHTML = `<div class="mv-empty">Loading body\u2026</div>`;
1005
1006
  headerEl.hidden = true;
1006
1007
  }
1007
1008
  attEl.hidden = true;
@@ -1024,7 +1025,8 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
1024
1025
  headerEl.hidden = false;
1025
1026
  } catch {
1026
1027
  }
1027
- bodyEl.innerHTML = `<div class="mv-preview-placeholder">${escapeHtml(msg.preview || cached?.preview || "")}</div>`;
1028
+ const previewText = (msg.preview || cached?.preview || "").trim();
1029
+ bodyEl.innerHTML = previewText ? `<div class="mv-preview-placeholder">${escapeHtml(previewText)}</div>` : `<div class="mv-empty">Fetching body from server\u2026</div>`;
1028
1030
  const captureGen = gen;
1029
1031
  const off = onEvent((ev) => {
1030
1032
  if (!ev || ev.type !== "bodyAvailable")
@@ -3157,8 +3159,13 @@ var init_message_list = __esm({
3157
3159
  }
3158
3160
  const body = this.el.parentElement;
3159
3161
  if (body?.classList.contains("multi-select-on")) {
3160
- this.setSelected(!this.isSelected);
3162
+ const willBeSelected = !this.isSelected;
3163
+ this.setSelected(willBeSelected);
3161
3164
  lastClickedRow = this.el;
3165
+ if (willBeSelected) {
3166
+ focusRow(this);
3167
+ this.setUnreadClass(false);
3168
+ }
3162
3169
  updateBulkBar();
3163
3170
  return;
3164
3171
  }
@@ -4423,7 +4430,9 @@ async function collectDueAlarms(now) {
4423
4430
  const startMs = ev.startMs || 0;
4424
4431
  if (!startMs)
4425
4432
  continue;
4426
- const offsets = Array.isArray(ev.reminderMinutes) && ev.reminderMinutes.length > 0 ? ev.reminderMinutes.map((m) => m * 6e4) : [CAL_LEAD_MS];
4433
+ if (!Array.isArray(ev.reminderMinutes) || ev.reminderMinutes.length === 0)
4434
+ continue;
4435
+ const offsets = ev.reminderMinutes.map((m) => m * 6e4);
4427
4436
  for (const offsetMs of offsets) {
4428
4437
  const occBaseKey = occKey(ev.uuid, startMs);
4429
4438
  const key = `${occBaseKey}@${offsetMs}`;
@@ -4738,14 +4747,13 @@ function startAlarmPoller() {
4738
4747
  });
4739
4748
  });
4740
4749
  }
4741
- var DISMISSED_KEY, SNOOZED_KEY, CAL_LEAD_MS, LOOKBACK_MS, LOOKAHEAD_MS, POLL_INTERVAL_MS, firedThisSession, openPopups;
4750
+ var DISMISSED_KEY, SNOOZED_KEY, LOOKBACK_MS, LOOKAHEAD_MS, POLL_INTERVAL_MS, firedThisSession, openPopups;
4742
4751
  var init_alarms = __esm({
4743
4752
  "client/components/alarms.js"() {
4744
4753
  "use strict";
4745
4754
  init_api_client();
4746
4755
  DISMISSED_KEY = "mailx-alarm-dismissed";
4747
4756
  SNOOZED_KEY = "mailx-alarm-snoozed";
4748
- CAL_LEAD_MS = 10 * 60 * 1e3;
4749
4757
  LOOKBACK_MS = 60 * 60 * 1e3;
4750
4758
  LOOKAHEAD_MS = 2 * 60 * 60 * 1e3;
4751
4759
  POLL_INTERVAL_MS = 3e4;