Opened 18 years ago

Closed 16 years ago

#1020 closed bug (fixed)

No save alert message for a changed draft mail. (easy)

Reported by: kaoutsis Owned by: axeld
Priority: normal Milestone: R1
Component: Applications/Mail Version: R1/pre-alpha1
Keywords: Cc: ksmith
Blocked By: Blocking:
Platform: All

Description

Open BeMail and create a new mail. Fill <To> Fill <Subject> with foo (or anything you like). Write a line to the body text. Then File => Save as Draft Close BeMail.

Go to the Deskbar right click to the mail icon Go Open Draft select foo add a line to the main body text, and Close BeMail (click to the yellow button of the window manager) No save alert message. Open again the foo email the last line you had added is missing.

Attachments (2)

Mail.cpp.diff (1.1 KB ) - added by kaoutsis 18 years ago.
posible fix
Mail.cpp.2.diff (292 bytes ) - added by ksmith 17 years ago.
Fix for bug as discussed in comments.

Download all attachments as: .zip

Change History (12)

in reply to:  description comment:1 by kaoutsis, 18 years ago

Replying to kaoutsis: Correcting the description: Open BeMail and creat a new mail. Fill <To> Fill <Subject> with foo Write a line to the body text. Then File => Save as Draft Close BeMail.

Go to the Deskbar right click to the mail icon Go Open Draft select foo add a line to the main body text, Then File => Save as Draft. Add an other line. This time close BeMail by clicking to the yellow button of the window manager. No save alert message. Open again the foo email the last line you have added is missing.

by kaoutsis, 18 years ago

Attachment: Mail.cpp.diff added

posible fix

comment:2 by kaoutsis, 18 years ago

Please ignore the patch, since i introduced an other bug, and i must dig further.

comment:3 by wkornewald, 18 years ago

Summary: No save alert message for a changed draft mail.No save alert message for a changed draft mail. (easy)

comment:4 by ksmith, 17 years ago

Cc: ksmith added

I am unable to recreate this bug. It is properly asking me if I want to re-save the draft if I change it and close. Perhaps this has already been fixed?

in reply to:  4 comment:5 by kaoutsis, 17 years ago

Replying to ksmith:

I am unable to recreate this bug. It is properly asking me if I want to re-save the draft if I change it and close. Perhaps this has already been fixed?

tested again with hrev21691, i did the following: Open Mail; write a line; File => Save as Draft; write a second line; File => Save as Draft; add a third line; Close the Mail app (no alert message); open the draft mail; third line is missing:)

comment:6 by ksmith, 17 years ago

ok, I was able to re-create the bug.

At the end of SaveAsDraft(), we are setting fSent to true. This never gets reset to false when you change text anywhere in the email. Since this remains true, we don't satisfy the conditions in the if statement of QuitRequested(). Setting fSent to false in the case Field_CHANGED of the MessageReceived() seems to fix this bug. However, I am not sure if this would introduce any other bugs.

in reply to:  6 comment:7 by kaoutsis, 17 years ago

Replying to ksmith:

ok, I was able to re-create the bug.

At the end of SaveAsDraft(), we are setting fSent to true. This never gets reset to false when you change text anywhere in the email. Since this remains true, we don't satisfy the conditions in the if statement of QuitRequested(). Setting fSent to false in the case Field_CHANGED of the MessageReceived() seems to fix this bug. However, I am not sure if this would introduce any other bugs.

Now you give me an idea, we just have to do this: At the end of SaveAsDraft() we can change the fSent from true to false. After all is more logic (we just want to save and not to sent). Nothing more is needed. I already do that and after some tests, it looks like the bug indeed is fixed, the bug-fix is yours, and btw: welcome to the community:)

by ksmith, 17 years ago

Attachment: Mail.cpp.2.diff added

Fix for bug as discussed in comments.

comment:8 by modeenf, 17 years ago

Have any one checked this diff?

comment:9 by kaoutsis, 16 years ago

pending patch: Mail.cpp.2.diff from 26/07/07

comment:10 by stippi, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev28641. I didn't really apply your patches, since I believe fSent should not be set in SaveAsDraft() at all. SaveAsDraft() is only used from Send(), which maintains fSent itself.

Note: See TracTickets for help on using tickets.