[dev] Hide deleted messages when trash folder in use

Martin Ebourne lists at ebourne.me.uk
Thu May 13 10:10:19 PDT 2004


On Fri, 2004-04-30 at 16:51, Martin Ebourne wrote:
> Currently when a trash folder is in use with IMAP if there are any
> deleted messages in a folder then they are shown in Imp. Conversely if I
> don't use a trash folder then I have the option to hide them.
> 
> This doesn't seem right to me. If I'm using a trash folder then that's
> obviously because I don't want to see the deleted messages so they
> should be hidden.

There's been no feedback on this so I'm just sending a ping. 

Having re-read the above I'm not really sure how clear I was either -
however, as it stands the current behaviour is very confusing and
doesn't make sense.

The problem only happens when Imp is set to use a trash folder with
IMAP. In this case if another MUA has deleted some messages in a folder
then they are shown in Imp as deleted with a line through them. If the
trash folder is not in use then there is an option to 'Hide deleted
messages', but even this isn't there when trash is enabled. Really the
only correct thing to do is not show these messages at all.

The patch below fixes this, but if it breaks something else I'd be
interested to know so we can come up with something that works in all
cases.

Cheers,

Martin.

> 
> ______________________________________________________________________
> Index: imp/lib/Mailbox.php
> ===================================================================
> RCS file: /repository/imp/lib/Mailbox.php,v
> retrieving revision 1.57
> diff -u -r1.57 Mailbox.php
> --- imp/lib/Mailbox.php	7 Apr 2004 14:43:19 -0000	1.57
> +++ imp/lib/Mailbox.php	30 Apr 2004 15:45:03 -0000
> @@ -873,7 +873,7 @@
>      {
>          global $prefs;
>  
> -        if ($prefs->getValue('delhide') && !$prefs->getValue('use_trash')) {
> +        if ($prefs->getValue('delhide') || $prefs->getValue('use_trash')) {
>              return true;
>          } else {
>              return false;
> 
> ______________________________________________________________________



More information about the dev mailing list