@bobfrankston/rmfmail 1.2.80 → 1.2.82

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
@@ -5777,12 +5777,18 @@ document.addEventListener("mailx-popout-action", ((e) => {
5777
5777
  const { action, msg, accountId } = e.detail || {};
5778
5778
  if (!msg)
5779
5779
  return;
5780
- if (action === "reply" || action === "replyAll" || action === "forward") {
5780
+ if (action === "reply" || action === "replyAll" || action === "forward" || action === "editAsNew") {
5781
5781
  openCompose(action, msg, accountId);
5782
5782
  }
5783
5783
  else if (action === "delete") {
5784
5784
  deleteMessage(accountId, msg.uid).catch((err) => console.error(`[popout] delete failed: ${err?.message || err}`));
5785
5785
  }
5786
+ else if (action === "flag") {
5787
+ const wasFlagged = flaggedOf(msg);
5788
+ setFlagged(msg, !wasFlagged);
5789
+ updateFlags(accountId, msg.uid, msg.flags, msg.folderId).catch((err) => console.error(`[popout] flag failed: ${err?.message || err}`));
5790
+ setRowFlagged(accountId, msg.uid, !wasFlagged);
5791
+ }
5786
5792
  }));
5787
5793
  document.addEventListener("mailx-popout-message", (async (e) => {
5788
5794
  const { accountId, uid, folderId, subject } = e.detail || {};