Closed
Bug 188051
Opened 23 years ago
Closed 23 years ago
IMAP mark as read sends DeleteOrMoveMsgCompleted event
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.3final
People
(Reporter: neil, Assigned: sspitzer)
References
()
Details
(Whiteboard: [adt3])
Attachments
(2 files, 2 obsolete files)
656 bytes,
text/plain
|
Details | |
1.31 KB,
patch
|
sspitzer
:
review+
Bienvenu
:
superreview+
sspitzer
:
superreview+
sspitzer
:
approval1.3+
|
Details | Diff | Splinter Review |
When using an IMAP folder, and I click on the Unread toggle in the thread pane,
then immediately open the context menu for a message, then that message is
loaded into the message pane. This doesn't happen with a local (POP) or news folder.
Comment 1•23 years ago
|
||
wfm - this is not likely to be an imap problem - it's the front end that tries
to load the message.
Reporter | ||
Comment 2•23 years ago
|
||
BTW, I forgot to mention, the problem doesn't occur working offline either.
works for me in 1/6 trunk on xp.
What build are you using Neil?
and in your steps:
1.I click on the Unread toggle in the thread pane,
2.then immediately open the context menu for a message,
3.then that message is loaded into the message pane.
Before step 1, is there a mesg already selected or no mesg selected
at all in thread pane?
after you do step 1, is that mesg selected?
I assume in step 2, you are clicking another mesg and not the one
you chose in step 1.
What type of imap mail server?
thanks.
Reporter | ||
Comment 4•23 years ago
|
||
IMAP server is from www.gordano.com * OK NTMail IMAP4 server v6.04.0010 ready
Also, your analysis of my steps is correct - the message which I am
right-clicking is not previously selected.
Also, I have just discovered by tracing though with Venkman, that the problem is
caused by a HandleDeleteOrMoveMsgCompleted item event. This event thinks that I
just deleted a message in another window and checks the selection, sees that
there is one item, and loads it. So why is this event being sent when I mark as
read? It is sent for every mark as read, but this is normally not noticable.
Summary: IMAP mark as read sometimes selects message → IMAP mark as read sends DeleteOrMoveMsgCompleted event
Whiteboard: interop?
Comment 5•23 years ago
|
||
Neil, is this a release build or your own build? If the latter, have you tried
doing a clobber? Have you been able to reproduce this with a released build?
Reporter | ||
Comment 6•23 years ago
|
||
This was originally in a Win nightly, and I double checked with a Linux build.
Reporter | ||
Comment 7•23 years ago
|
||
FYI: The event is generated by line 4485 in nsImapMailFolder.cpp
Reporter | ||
Comment 8•23 years ago
|
||
The URL being processed is imap://bad@mail:143/addmsgflags>UID>.INBOX>759>1
Reporter | ||
Comment 9•23 years ago
|
||
Surely the NotifyFolderEvent belongs inside this if?
Reporter | ||
Comment 10•23 years ago
|
||
This fixes the problem for me.
Reporter | ||
Updated•23 years ago
|
Attachment #113677 -
Flags: superreview?(sspitzer)
Attachment #113677 -
Flags: review?(bienvenu)
Comment 11•23 years ago
|
||
No, I think the correct fix is to break out second clause of the if (the
ShowDeletedMessages() part) and then put the Notify event inside the first
clause. Otherwise, you're going to break stuff. So it should look something like
this:
if (flags & kImapMsgDeletedFlag)
{
if (!ShowDeletedMessages())
{
nsCOMPtr<nsIMsgDatabase> db;
rv = GetMsgDatabase(nsnull, getter_AddRefs(db));
if (NS_SUCCEEDED(rv) && db)
{
nsMsgKeyArray keyArray;
char *keyString = nsnull;
imapUrl->CreateListOfMessageIdsString(&keyString);
if (keyString)
{
ParseUidString(keyString, keyArray);
db->DeleteMessages(&keyArray, nsnull);
db->SetSummaryValid(PR_TRUE);
db->Commit(nsMsgDBCommitType::kLargeCommit);
nsCRT::free(keyString);
}
}
}
NotifyFolderEvent(mDeleteOrMoveMsgCompletedAtom);
}
Reporter | ||
Comment 12•23 years ago
|
||
Bah, DeleteOrMoveMessageCompleted is broken for IMAP mark as deleted anyway :-P
Assignee | ||
Comment 13•23 years ago
|
||
hoping to get to this for 1.3 final
Assignee: bienvenu → sspitzer
Severity: minor → normal
Keywords: nsbeta1
Target Milestone: --- → mozilla1.3final
Comment 14•23 years ago
|
||
Mail triage team: nsbeta1+/adt3
Assignee | ||
Comment 15•23 years ago
|
||
accepting, since it must be driving imap delete model users (like neil) nuts.
I'll investigate the fix bienvenu suggested.
Status: NEW → ASSIGNED
Assignee | ||
Comment 16•23 years ago
|
||
I'm using mark as deleted as my imap delete model, but I've not figure out how
to reproduce this.
Comment 17•23 years ago
|
||
do you need to have a stand alone msg window open as well?
Assignee | ||
Comment 18•23 years ago
|
||
I am seeing something that neil reported back in comment #4.
I see HandleDeleteOrMoveMsgCompleted() getting called when a message is marked
as unread.
I'll start there.
Assignee | ||
Comment 19•23 years ago
|
||
ok, this is what bienvenu was talking about in comment #11.
I'm trying out his suggested fix now.
what the current code does is when we add imap flags, we always send the
deleted or copied folder event, but we should only be doing that when we add
the "imap delete" flag.
Assignee | ||
Comment 20•23 years ago
|
||
Comment on attachment 113677 [details] [diff] [review]
Proposed patch
bienvenu suggested something else, I'll attach it.
Attachment #113677 -
Flags: superreview?(sspitzer)
Attachment #113677 -
Flags: superreview-
Attachment #113677 -
Flags: review?(bienvenu)
Attachment #113677 -
Flags: review-
Assignee | ||
Comment 21•23 years ago
|
||
Attachment #113677 -
Attachment is obsolete: true
Assignee | ||
Comment 22•23 years ago
|
||
Attachment #113848 -
Attachment is obsolete: true
Comment 23•23 years ago
|
||
Comment on attachment 113849 [details] [diff] [review]
same fix, more comments, still need to test.
r/sr=bienvenu
Attachment #113849 -
Flags: superreview+
Assignee | ||
Comment 24•23 years ago
|
||
Comment on attachment 113849 [details] [diff] [review]
same fix, more comments, still need to test.
r/sr=sspitzer on bienvenu patch.
I tested mark as delete and move to trash delete models, and we do the right
thing.
I bet there are other existing bugs that are dups of this.
worth taking for 1.3 beta, so seeking approval.
Attachment #113849 -
Flags: review+
Attachment #113849 -
Flags: approval1.3b?
Assignee | ||
Comment 25•23 years ago
|
||
> Bah, DeleteOrMoveMessageCompleted is broken for IMAP mark as deleted anyway
I think I know what neil is referring to.
in this delete model, we don't select the next message, instead of the next un-
deleted message.
see bug #65823. if you mean something else, let me know.
Comment 26•23 years ago
|
||
Comment on attachment 113849 [details] [diff] [review]
same fix, more comments, still need to test.
I think we're wrapped on 1.3beta so this will have to wait 'till final.
Attachment #113849 -
Flags: approval1.3b? → approval1.3b-
Reporter | ||
Comment 27•23 years ago
|
||
As well as those issues, I seem to remember that no event is generated when you
are offline or after a compact.
Assignee | ||
Comment 28•23 years ago
|
||
Comment on attachment 113849 [details] [diff] [review]
same fix, more comments, still need to test.
seeking approval for 1.3 final.
Attachment #113849 -
Flags: approval1.3b- → approval1.3?
Assignee | ||
Comment 29•23 years ago
|
||
Comment on attachment 113849 [details] [diff] [review]
same fix, more comments, still need to test.
asa says (over irc) a=asa for 1.3 final, but wait until the tree is ready for
1.3 final checkins.
Attachment #113849 -
Flags: approval1.3? → approval1.3+
Assignee | ||
Comment 30•23 years ago
|
||
fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 31•23 years ago
|
||
> As well as those issues, I seem to remember that no event is generated when
> you are offline or after a compact.
neil, can you log a new bug on that issue?
Whiteboard: [adt3] interop? → [adt3]
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•