add prefetch config value

This commit is contained in:
B. Petersen
2020-10-15 22:39:27 +02:00
committed by holger krekel
parent 19697e255e
commit aa26c52813
3 changed files with 11 additions and 5 deletions

View File

@@ -353,11 +353,13 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
e2ee::ensure_secret_key_exists(ctx).await?;
info!(ctx, "key generation completed");
job::add(
ctx,
job::Job::new(Action::FetchExistingMsgs, 0, Params::new(), 0),
)
.await;
if ctx.get_config_bool(Config::Prefetch).await {
job::add(
ctx,
job::Job::new(Action::FetchExistingMsgs, 0, Params::new(), 0),
)
.await;
}
progress!(ctx, 940);
update_device_chats_handle.await?;