@bobfrankston/rmfmail 1.2.149 → 1.2.151

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.
@@ -4434,9 +4434,11 @@ export class ImapManager extends EventEmitter {
4434
4434
  // seem to still leave it in draft so I don't know if it has been
4435
4435
  // sent or not. Once you hand it off it must leave draft."
4436
4436
  let localDeletedUid = 0;
4437
+ let localDeletedUuid: string | undefined;
4437
4438
  if (draftUid) {
4438
4439
  const existing = this.db.getMessageByUid(accountId, draftUid, drafts.id);
4439
4440
  if (existing) {
4441
+ localDeletedUuid = (existing as any).uuid;
4440
4442
  this.unlinkBodyFile(accountId, draftUid, drafts.id).catch(() => {});
4441
4443
  this.db.deleteMessage(accountId, drafts.id, draftUid, "user sent the message (draft cleanup)", "mailx-imap deleteDraft (local)");
4442
4444
  localDeletedUid = draftUid;
@@ -4453,6 +4455,17 @@ export class ImapManager extends EventEmitter {
4453
4455
  if (localDeletedUid > 0) {
4454
4456
  this.db.recalcFolderCounts(drafts.id);
4455
4457
  this.emit("folderCountsChanged", accountId, {});
4458
+ // messageRemoved drives the list's remove-stale flow AND the
4459
+ // viewer clear. Without it, discarding a draft that was open in
4460
+ // the preview pane left it displayed after the row vanished
4461
+ // (Bob 2026-07-18: "I discarded a message but it is still
4462
+ // showing in preview"). Same shape the reconciler publishes on
4463
+ // server-side EXPUNGE.
4464
+ storeBus.publish({
4465
+ topic: localDeletedUuid ? `message:${localDeletedUuid}` : `folder:${drafts.id}`,
4466
+ kind: "messageRemoved",
4467
+ accountId, folderId: drafts.id, uid: localDeletedUid, msgUuid: localDeletedUuid,
4468
+ });
4456
4469
  }
4457
4470
 
4458
4471
  let succeeded = false;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-imap",
3
- "version": "0.1.117",
3
+ "version": "0.1.118",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bobfrankston/mailx-imap",
9
- "version": "0.1.117",
9
+ "version": "0.1.118",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "@bobfrankston/iflow-direct": "^0.1.27",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-imap",
3
- "version": "0.1.117",
3
+ "version": "0.1.118",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-store",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",