major change to deletion process
charles at charlesmcnulty.com
Fri Apr 28 07:00:53 CEST 2006
I've just finished changes to a pretty significant change to the way RC
handles deleted mail, and I wanted to run it past y'all before I
comitted it. First I'll describe the existing process, then I'll
describe how I changed it.
Overview: if mail can be moved to the Trash folder it is, otherwise it
is immediately and irrevokably deleted.
1)If trash mailbox is defined and you are not deleting something from
within the trash folder mail is moved to the trash folder
2)If no trash mailbox is defined mail is deleted immediately and permenantly
3)If you delete something from within the trash folder it is deleted
4)If a message has been flagged as deleted (from some other program) it
has a default style of shaded out, and there is no ability to undelete
it. It acts just like all other mail
Overview: If there is a Trash folder nothing changes (mostly). If there
isn't a trash folder defined messages are flagged as deleted
1) If you have a Trash folder defined nothing should be noticeably
2) If you don't have a trash folder defined messages are flagged as
deleted and the deleted style is applied to them.
By default the deleted style will be "display: none" meaning they
will disappear and things will appear to have not changed
3) If you change the deleted style to be striked out, or greyed out (for
instance), they will be visible and there will be a little trash can
icon in the same column as the "unread" icon column. Clicking on the
Trash icon toggles the deleted status
I will be doing more testing and cleaning up my code tomorrow. I'm
feeling pretty good about these changes at the moment. The default
behavior will be identical in almost all situations, and if in the
future we want to change the default behavior, it's as easy as changing
the mail.css file. It introduces the ability to undelete messages, and
in general makes the code a little cleaner and more modular IMO. (In
particular the deletion logic is now all centralized in a
delete_messages function, instead of scattered about between the
delete_message, command() and move_messages() functions.
Any comments? Suggestions?
More information about the Dev