Email unread count incorrect if previously read mail is marked unread while folder closed
- Read some email in Geary, then quit the app.
- In another MUA, mark the read email as unread again
- Re-open Geary (if the message was in the Inbox) or select the the folder if no the Inbox
The email marked as unread will be counted as unread twice so the unread counter goes up twice as much as it should. Might also happen when inverted (i.e. unread marked as read, counted as read twice).
This is happening since when a folder is first opened, the local folder properties (inc. unread count) are updated from the remote, and will be accurate. MinimalFolder's flag updater then runs, discovers newly read or unread messages, then increments or decrements the unread count, making it incorrect.