@bobfrankston/rmfmail 1.1.187 → 1.1.189

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
@@ -164,19 +164,24 @@ function updateBadge(count) {
164
164
  // no-op on Linux/Mac. For count=0, render a dedicated "no-overlay"
165
165
  // icon that's all-transparent so the base icon shows cleanly.
166
166
  try {
167
- const msgapi = window.msgapi;
168
- if (msgapi?.setTaskbarOverlay) {
167
+ // The injected host bridge is `window.mailxapi`, NOT `window.msgapi`.
168
+ // The old `msgapi` reference was always undefined, so the taskbar
169
+ // overlay never fired — the count badge silently did nothing on the
170
+ // taskbar for the whole life of this feature (Bob 2026-05-28 "are you
171
+ // able to show the number of new messages").
172
+ const hostApi = window.mailxapi;
173
+ if (hostApi?.setTaskbarOverlay) {
169
174
  if (count > 0) {
170
175
  // strip "data:image/png;base64," prefix → base64 only
171
176
  const b64 = dataUrl.split(",")[1] || "";
172
- msgapi.setTaskbarOverlay(b64, `${count} unread`);
177
+ hostApi.setTaskbarOverlay(b64, `${count} unread`);
173
178
  }
174
179
  else {
175
- msgapi.setTaskbarOverlay("", "");
180
+ hostApi.setTaskbarOverlay("", "");
176
181
  }
177
182
  }
178
183
  }
179
- catch { /* msgapi unavailable in browser fallback */ }
184
+ catch { /* host bridge unavailable in browser fallback */ }
180
185
  }
181
186
  async function updateNewMessageCount() {
182
187
  try {