mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
Apply suggestions from code review
Co-authored-by: link2xt <link2xt@testrun.org>
This commit is contained in:
@@ -3152,7 +3152,7 @@ void dc_accounts_maybe_network_lost (dc_accounts_t* accounts);
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform a Background fetch for all accounts in parallel with a timeout.
|
* Perform a background fetch for all accounts in parallel with a timeout.
|
||||||
* Pauses the scheduler, fetches messages from imap and then resumes the scheduler.
|
* Pauses the scheduler, fetches messages from imap and then resumes the scheduler.
|
||||||
*
|
*
|
||||||
* dc_accounts_background_fetch_with_timeout() was created for the iOS Background fetch.
|
* dc_accounts_background_fetch_with_timeout() was created for the iOS Background fetch.
|
||||||
@@ -3161,7 +3161,7 @@ void dc_accounts_maybe_network_lost (dc_accounts_t* accounts);
|
|||||||
* @param timeout The timeout in seconds
|
* @param timeout The timeout in seconds
|
||||||
* @return Return 1 on success and 0 on failure (like timeout)
|
* @return Return 1 on success and 0 on failure (like timeout)
|
||||||
* But note that this only indicates that the fetch of all accounts was done before the timeout.
|
* But note that this only indicates that the fetch of all accounts was done before the timeout.
|
||||||
* To know wether it worked you need to look for the events.
|
* To know whether it worked you need to look for the events.
|
||||||
*/
|
*/
|
||||||
int dc_accounts_background_fetch_with_timeout (dc_accounts_t* accounts, uint64_t timeout);
|
int dc_accounts_background_fetch_with_timeout (dc_accounts_t* accounts, uint64_t timeout);
|
||||||
|
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ impl Context {
|
|||||||
self.scheduler.maybe_network().await;
|
self.scheduler.maybe_network().await;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Do a background fetch
|
/// Does a background fetch
|
||||||
/// pauses the scheduler and does one imap fetch, then unpauses and returns
|
/// pauses the scheduler and does one imap fetch, then unpauses and returns
|
||||||
pub async fn background_fetch(&self) -> Result<()> {
|
pub async fn background_fetch(&self) -> Result<()> {
|
||||||
if !(self.is_configured().await?) {
|
if !(self.is_configured().await?) {
|
||||||
@@ -468,7 +468,7 @@ impl Context {
|
|||||||
|
|
||||||
// update quota (to send warning if full)
|
// update quota (to send warning if full)
|
||||||
if let Err(err) = self.update_recent_quota(&mut connection).await {
|
if let Err(err) = self.update_recent_quota(&mut connection).await {
|
||||||
warn!(self, "Failed to update quota: {:#}.", err);
|
warn!(self, "Failed to update quota: {err:#}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
info!(
|
info!(
|
||||||
|
|||||||
Reference in New Issue
Block a user