Open Bug 541072 Opened 14 years ago Updated 2 years ago

IMAP mark-as-deleted model: undelete advances to next message

Categories

(MailNews Core :: Networking: IMAP, defect)

defect

Tracking

(Not tracked)

People

(Reporter: neil, Unassigned)

References

Details

(Keywords: regression, Whiteboard: [patchlove])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #451877 +++

Using the IMAP with the mark as deleted model quite annoying since undeleting a message advances to the next message.

Happens both on 3.0 and trunk.
Attached patch Possible patchSplinter Review
This might fix it, but I don't know how to write a test for it.
test is difficult, if not impossible, because we can't do imap with mozmill, and mozmill doesn't work offline (though that's getting fixed, I believe).
Severity: major → minor
(In reply to David :Bienvenu from comment #2)
> test is difficult, if not impossible, because we can't do imap with mozmill,
> and mozmill doesn't work offline (though that's getting fixed, I believe).

is this still true?  And if it is, can we accept patch without test?
Flags: needinfo?(irving)
Comment on attachment 422723 [details] [diff] [review]
Possible patch

Review of attachment 422723 [details] [diff] [review]:
-----------------------------------------------------------------

::: mailnews/imap/src/nsImapMailFolder.cpp
@@ +2335,5 @@
>            mDatabase->DeleteMessages(srcKeyArray.Length(), srcKeyArray.Elements(), nsnull);
>            EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_TRUE /*dbBatching*/);
>          }
> +        if (deleteMsgs)
> +          NotifyFolderEvent(mDeleteOrMoveMsgCompletedAtom);

Would it be better to put an else clause on this like

else
  NotifyFolderEvent(mDeleteOrMoveMsgFailedAtom);

There isn't a perfectly suited notification atom, but at least this tells listeners that something has changed.

As far as the test goes, an xpcshell test that the correct notification gets sent, combined with a manual test (in TB and SM) that the display updates correctly, works for me.
Flags: needinfo?(irving)
Do you still see this?
I tried a couple times and was unable to reproduce.
Flags: needinfo?(neil)
Absolutely still there. Maybe we should just land the patch as testing is way challenging as we can't test imap in mozmill.
Flags: needinfo?(neil)

(In reply to Magnus Melin [:mkmelin] from comment #6)

Absolutely still there. Maybe we should just land the patch as testing is
way challenging as we can't test imap in mozmill.

Flags: needinfo?(mkmelin+mozilla)
See Also: → 65823
Whiteboard: [patchlove]

Ben if you are able to land this patch, then I can highlight it for testing in the upcoming beta.

Flags: needinfo?(benc)

Ben, I don't remember - you use mark as deleted?

Flags: needinfo?(ben.bucksch)
Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(benc)
Flags: needinfo?(ben.bucksch)
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: