Emit DC_EVENT_ACCOUNTS_BACKGROUND_FETCH_DONE even on timeout

Otherwise if there is a timeout,
UI will wait for DC_EVENT_ACCOUNTS_BACKGROUND_FETCH_DONE forever.
This commit is contained in:
link2xt
2024-01-30 00:34:55 +00:00
committed by bjoern
parent af7bf5bd2b
commit f7fd1ef2bf
3 changed files with 17 additions and 9 deletions

View File

@@ -233,8 +233,9 @@ impl CommandApi {
/// Performs a background fetch for all accounts in parallel with a timeout.
///
/// The `AccountsBackgroundFetchDone` event is emitted at the end,
/// process all events until you get this one and you can safely return to the background
/// The `AccountsBackgroundFetchDone` event is emitted at the end
/// if the method returns sucessfully, even in case of timeout.
/// Process all events until you get this one and you can safely return to the background
/// without forgetting to create notifications caused by timing race conditions.
async fn accounts_background_fetch(&self, timeout_in_seconds: f64) -> Result<()> {
self.accounts