@bobfrankston/rmfmail 1.0.512 → 1.0.516

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.
@@ -26,9 +26,9 @@
26
26
 
27
27
  import fs from "node:fs";
28
28
  import path from "node:path";
29
- import { fileURLToPath, pathToFileURL } from "node:url";
29
+ import { pathToFileURL } from "node:url";
30
30
 
31
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
31
+ const __dirname = import.meta.dirname;
32
32
 
33
33
  // ── Provider defaults: same set mailx-settings uses ────────────────────────
34
34
  const PROVIDERS = {
package/client/app.js CHANGED
@@ -1905,18 +1905,16 @@ onWsEvent((event) => {
1905
1905
  refreshFolderTree();
1906
1906
  // Q53: track per-account last-sync timestamp for the status-bar hover.
1907
1907
  recordAccountSync(event.accountId);
1908
- // Reload the currently-displayed folder. folderCountsChanged
1909
- // already triggers a debounced reload when *new* messages arrive,
1910
- // but on Android the first sync of an account can produce a
1911
- // bunch of folderCountsChanged events that get coalesced — and
1912
- // if the unified inbox is the active view but no individual
1913
- // folder count changed *during* the debounce window, the
1914
- // message list never refreshes. The phone stayed on its
1915
- // "no messages" placeholder while Phase 1/2 sync filled the
1916
- // DB underneath. Forcing one more reload at sync end is cheap
1917
- // (a single SQL query) and makes the user-visible state catch
1918
- // up to the DB.
1919
- reloadCurrentFolder();
1908
+ // Earlier I added reloadCurrentFolder() here to fix the
1909
+ // "phone INBOX stays on placeholder" report. That broke desktop
1910
+ // because syncComplete fires repeatedly on the desktop sync
1911
+ // loop, and each reload rebuilds the message-list DOM
1912
+ // mid-read the focusedRow Row object becomes a stale
1913
+ // pointer to a detached element, and the viewer's "Select a
1914
+ // message to read" placeholder stays up while the new row
1915
+ // shows .selected. Removed: folderCountsChanged already
1916
+ // triggers a debounced reload when new messages actually
1917
+ // arrive (which is what the phone case really needs anyway).
1920
1918
  break;
1921
1919
  case "folderSynced":
1922
1920
  // Per-folder timestamps — drives the tooltip + freshness dot.