Re: [Bug + Fix?] Clear serach filter when an IMAP mailbox is closed

Hi Albrecht,

On 07/31/2019 08:17:11 AM Wed, Albrecht Dreß wrote:
Hi all,

I noticed that an IMAP search filter is not removed when closing the mailbox.  To reproduce:
1. open an IMAP mailbox
2. enter a string in the search entry, so that only some messages are displayed
3. close the mailbox
4. re-open the mailbox

After step 4, the search entry is empty, but only the messages as selected by the value given is step 2 are 
visible, ehich is confusing.  Afaict, this effect does not happen with MBox or Maildir mailboxes.

Running Balsa in the debugger, I /think/ this is caused by not clearing the priv->view_filter item of the 
mailbox when it is closed.  The attached simple two-liner patch fixes this for IMAP.  It /seems/ as if does not 
have any advert effect on other mailboxes, but as I do not fully understand what happens it would be great if 
someone could double-check it.


I've seen that myself, but never felt motivated to look for a fix :-)

I tested your patch and found no issues, but since it affects only IMAP mailboxes, I'd feel more comfortable 
with a more limited fix (see attached). The handling of view-filters seems to be very different between local 
mailboxes and IMAP.

What do you think?


Attachment: mailbox-imap.diff
Description: Text Data

Attachment: pgpbdxsFwYX2t.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]