Manos Pitsidianakis
17a0f31b3e
UIEvent::StartupCheck was meant to notify the UI that a folder had made progress and polling its async worker would return a Result<Vec<Envelope>>. However the StartupCheck was received by MailListing components which called account.status() which did the polling. That means that if the polling got back results, the listing would have to call account.status() again to show them. This is a problem in configurations with only one account because there aren't any other sources of event to force the listing to recheck account.status() A new event UIEvent::WorkerProgress will do the job of notifying an Account to poll its workers and the account will send a startupcheck if it has made progress. That way the refresh progress is as follows: Worker thread sends WorkerProgress event -> State calls appropriate account's account.status() method -> account polls workers, and if there are new results send StartupCheck events -> State passes StartupCheck events to components -> Listings update themselves when they receive the event |
||
---|---|---|
.. | ||
python | ||
bin.rs |