Re: Second impressions of Balsa




> PS. I have been looking at Matthew's patch, it seems nice but I have
> impresion it adds redundant has_unread_messages field to the Mailbox
> structure - it basically duplicates information from unread_messages
> field. I think this question should be clarified before applying the
> patch.
> 

They actually serve similar but different purposes. The unread_messages
variable contains a count of the number of unread messages in the mailbox
that is being displayed in the index. The has_unread_messages flag
indicates
that the mailbox on disk has one or more unread messages. The difference is
important because the number of unread messages can only be determined by
parsing all of the messages in the mailbox, while has_unread_messages can
be
determined quickly by looking at the disk file.

Although it might be possible to implement my patch's functionality using
only unread_messages and open_ref, it will not handle all possible
situations. We could set unread_messages to TRUE when open_ref was equal to
zero, and use it as a counter if open_ref is greater than zero. However
this
will not handle the case where new mail arrives to the file on disk while
the mailbox is open and has unread messages. If we're going to implement
dynamic updating of mailbox indexes (and I plan to), I think we're going to
need that extra variable.

Is that enough clarification for you?  :)

MBG

-- 
   Matthew Guenther                       Whom the mad would destroy, first
   mguenthe@netcom.ca                     they make Gods.
   http://www.netcom.ca/~mguenthe/        		-- Bernard Levin



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