@bobfrankston/rmfmail 1.1.192 → 1.1.194

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.
package/client/app.js CHANGED
@@ -446,6 +446,15 @@ initFolderTree(folderTree, (accountId, folderId, folderName, specialUse) => {
446
446
  markAsSeen();
447
447
  releaseFocus();
448
448
  loadMessages(accountId, folderId, 1, specialUse);
449
+ // Lazy-folder-sync: opening a folder fetches its latest from the server
450
+ // (fire-and-forget). The full all-folders sweep now runs only every 30
451
+ // min, so on-open sync is what keeps a folder you're actually looking at
452
+ // fresh. The folderSynced event refreshes the list when it lands. INBOX
453
+ // is excluded — IDLE + the 5-min quick check already keep it live, and
454
+ // re-syncing it on every visit is wasted work.
455
+ if (specialUse !== "inbox") {
456
+ import("./lib/api-client.js").then(m => m.syncFolderNow?.(accountId, folderId)).catch(() => { });
457
+ }
449
458
  setTitle(`${APP_NAME} - ${folderName}`);
450
459
  setNarrowFolderTitle(folderName);
451
460
  // Record the navigation in the active tab so a later tab-switch restores