From 5bb80f94c79d3a31a8588858c0fb56c04113002e Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Sun, 14 Jan 2024 21:19:21 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: bjoern --- deltachat-jsonrpc/src/api.rs | 2 +- node/constants.js | 2 +- node/events.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deltachat-jsonrpc/src/api.rs b/deltachat-jsonrpc/src/api.rs index f8e46c50f..c03400265 100644 --- a/deltachat-jsonrpc/src/api.rs +++ b/deltachat-jsonrpc/src/api.rs @@ -236,7 +236,7 @@ impl CommandApi { /// The `AccountsBackgroundFetchDone` event is emitted at the end, /// process all events until you get this one and you can safely return to the background /// without forgeting to create notifications caused by timing race conditions. - async fn background_fetch_for_all_accounts(&self, timeout_in_seconds: f64) -> Result<()> { + async fn accounts_background_fetch(&self, timeout_in_seconds: f64) -> Result<()> { self.accounts .write() .await diff --git a/node/constants.js b/node/constants.js index d980baf2d..59031ee1d 100644 --- a/node/constants.js +++ b/node/constants.js @@ -29,7 +29,7 @@ module.exports = { DC_DOWNLOAD_FAILURE: 20, DC_DOWNLOAD_IN_PROGRESS: 1000, DC_DOWNLOAD_UNDECIPHERABLE: 30, - DC_EVENT_BACKGROUND_FETCH_COMPLETED_FOR_ALL_ACCOUNTS: 2200, + DC_EVENT_ACCOUNTS_BACKGROUND_FETCH_DONE: 2200, DC_EVENT_CHAT_EPHEMERAL_TIMER_MODIFIED: 2021, DC_EVENT_CHAT_MODIFIED: 2020, DC_EVENT_CONFIGURE_PROGRESS: 2041, diff --git a/node/events.js b/node/events.js index b418bf6ab..a5c9281b9 100644 --- a/node/events.js +++ b/node/events.js @@ -37,5 +37,5 @@ module.exports = { 2111: 'DC_EVENT_CONFIG_SYNCED', 2120: 'DC_EVENT_WEBXDC_STATUS_UPDATE', 2121: 'DC_EVENT_WEBXDC_INSTANCE_DELETED', - 2200: 'DC_EVENT_BACKGROUND_FETCH_COMPLETED_FOR_ALL_ACCOUNTS' + 2200: 'DC_EVENT_ACCOUNTS_BACKGROUND_FETCH_DONE' }