@bobfrankston/rmfmail 1.1.146 → 1.1.148

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.
@@ -3575,17 +3575,15 @@ var init_message_list = __esm({
3575
3575
  }
3576
3576
  ]);
3577
3577
  }
3578
- async onFlagClick(e) {
3578
+ onFlagClick(e) {
3579
3579
  e.stopPropagation();
3580
3580
  const newFlaggedState = !this.el.classList.contains("flagged");
3581
- const probe = { flags: [...this.msg.flags || []] };
3582
- setFlagged(probe, newFlaggedState);
3583
- try {
3584
- await updateFlags(this.accountId, this.msg.uid, probe.flags);
3585
- this.msg.flags = probe.flags;
3586
- this.setFlaggedClass(newFlaggedState);
3587
- } catch {
3588
- }
3581
+ const prevFlags = [...this.msg.flags || []];
3582
+ this.isFlagged = newFlaggedState;
3583
+ updateFlags(this.accountId, this.msg.uid, this.msg.flags).catch(() => {
3584
+ this.msg.flags = prevFlags;
3585
+ this.setFlaggedClass(!newFlaggedState);
3586
+ });
3589
3587
  }
3590
3588
  onRowClick(e) {
3591
3589
  if (touchWasScroll) {