@bobfrankston/mailx 1.0.413 → 1.0.415

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.
Files changed (2) hide show
  1. package/bin/mailx.js +12 -7
  2. package/package.json +1 -1
package/bin/mailx.js CHANGED
@@ -1027,20 +1027,25 @@ RFC 5322 with CRLF line endings. Bodies are quoted-printable encoded (readable i
1027
1027
  }
1028
1028
  catch { /* no saved geometry — use defaults */ }
1029
1029
  const rootPkgVersion = JSON.parse(fs.readFileSync(path.join(import.meta.dirname, "..", "package.json"), "utf-8")).version;
1030
- // Prefer .ico over .png for the window icon: on Windows, the .ico
1031
- // path doubles as the PKEY_AppUserModel_RelaunchIconResource value
1032
- // so taskbar pins use mailx's icon instead of msgernative's embedded
1033
- // resource. msger auto-detects the .ico extension and wires the
1034
- // relaunch icon after window creation.
1030
+ // Pass the .png as the window-decode icon: msger uses the `image` crate
1031
+ // to decode `options.icon` for the Tao window icon, and PNG-in-ICO files
1032
+ // round-trip unreliably through the image-0.24 ICO decoder, which leaves
1033
+ // the taskbar entry showing the empty msgernative.exe default. PNG always
1034
+ // decodes cleanly. The .ico path is forwarded separately as
1035
+ // `relaunchIcon`, which msger uses for `PKEY_AppUserModel_RelaunchIconResource`
1036
+ // (the path is consumed verbatim — no decode — so PNG-in-ICO is fine
1037
+ // there). Falls back if either file is missing.
1035
1038
  const __iconIco = path.join(clientDir, "icon.ico");
1036
1039
  const __iconPng = path.join(clientDir, "icon.png");
1037
- const __iconPath = fs.existsSync(__iconIco) ? __iconIco : __iconPng;
1040
+ const __iconPathRuntime = fs.existsSync(__iconPng) ? __iconPng : __iconIco;
1041
+ const __iconPathPin = fs.existsSync(__iconIco) ? __iconIco : undefined;
1038
1042
  const handle = showService({
1039
1043
  title: `mailx v${rootPkgVersion}`,
1040
1044
  url: "index.html",
1041
1045
  contentDir: clientDir,
1042
1046
  initScript: mailxapiScript,
1043
- icon: __iconPath,
1047
+ icon: __iconPathRuntime,
1048
+ relaunchIcon: __iconPathPin,
1044
1049
  aumid: "com.frankston.mailx",
1045
1050
  size: savedGeometry
1046
1051
  ? { width: savedGeometry.width, height: savedGeometry.height }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx",
3
- "version": "1.0.413",
3
+ "version": "1.0.415",
4
4
  "description": "Local-first email client with IMAP sync and standalone native app",
5
5
  "type": "module",
6
6
  "main": "bin/mailx.js",