@bobfrankston/rmfmail 1.0.698 → 1.0.700

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.
@@ -3288,7 +3288,7 @@ var init_message_list = __esm({
3288
3288
  focusRow(this);
3289
3289
  }
3290
3290
  }
3291
- const isSeen = this.msg.flags.includes("\\Seen");
3291
+ const isSeen = !this.el.classList.contains("unread");
3292
3292
  const isFlagged = this.msg.flags.includes("\\Flagged");
3293
3293
  const accountId = this.accountId;
3294
3294
  const msg = this.msg;
@@ -3297,7 +3297,12 @@ var init_message_list = __esm({
3297
3297
  {
3298
3298
  label: isSeen ? "Mark unread" : "Mark read",
3299
3299
  action: async () => {
3300
- const newFlags = isSeen ? msg.flags.filter((f) => f !== "\\Seen") : [...msg.flags, "\\Seen"];
3300
+ const set = new Set(msg.flags);
3301
+ if (isSeen)
3302
+ set.delete("\\Seen");
3303
+ else
3304
+ set.add("\\Seen");
3305
+ const newFlags = Array.from(set);
3301
3306
  try {
3302
3307
  await updateFlags(accountId, msg.uid, newFlags);
3303
3308
  msg.flags = newFlags;