mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 05:16:28 +03:00
this works with https://github.com/deltachat/deltachat-android/issues/1676
This commit is contained in:
@@ -7,7 +7,7 @@ mod server_params;
|
|||||||
|
|
||||||
use anyhow::{bail, ensure, Context as _, Result};
|
use anyhow::{bail, ensure, Context as _, Result};
|
||||||
use async_std::prelude::*;
|
use async_std::prelude::*;
|
||||||
use async_std::task;
|
//use async_std::task;
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use job::Action;
|
use job::Action;
|
||||||
use percent_encoding::{utf8_percent_encode, NON_ALPHANUMERIC};
|
use percent_encoding::{utf8_percent_encode, NON_ALPHANUMERIC};
|
||||||
@@ -163,8 +163,8 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
|
|||||||
DC_LP_AUTH_NORMAL as i32
|
DC_LP_AUTH_NORMAL as i32
|
||||||
};
|
};
|
||||||
|
|
||||||
let ctx2 = ctx.clone();
|
//let ctx2 = ctx.clone();
|
||||||
let update_device_chats_handle = task::spawn(async move { ctx2.update_device_chats().await });
|
//let update_device_chats_handle = task::spawn(async move { ctx2.update_device_chats().await });
|
||||||
|
|
||||||
// Step 1: Load the parameters and check email-address and password
|
// Step 1: Load the parameters and check email-address and password
|
||||||
|
|
||||||
@@ -258,7 +258,7 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
|
|||||||
.cloned()
|
.cloned()
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let smtp_config_task = task::spawn(async move {
|
//let smtp_config_task = task::spawn(async move {
|
||||||
let mut smtp_configured = false;
|
let mut smtp_configured = false;
|
||||||
let mut errors = Vec::new();
|
let mut errors = Vec::new();
|
||||||
for smtp_server in smtp_servers {
|
for smtp_server in smtp_servers {
|
||||||
@@ -278,12 +278,10 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if smtp_configured {
|
if !smtp_configured {
|
||||||
Ok(smtp_param)
|
bail!(nicer_configuration_error(ctx, errors).await);
|
||||||
} else {
|
|
||||||
Err(errors)
|
|
||||||
}
|
}
|
||||||
});
|
//});
|
||||||
|
|
||||||
progress!(ctx, 600);
|
progress!(ctx, 600);
|
||||||
|
|
||||||
@@ -323,14 +321,14 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
|
|||||||
progress!(ctx, 850);
|
progress!(ctx, 850);
|
||||||
|
|
||||||
// Wait for SMTP configuration
|
// Wait for SMTP configuration
|
||||||
match smtp_config_task.await {
|
/*match smtp_config_task.await {
|
||||||
Ok(smtp_param) => {
|
Ok(smtp_param) => {
|
||||||
param.smtp = smtp_param;
|
param.smtp = smtp_param;
|
||||||
}
|
}
|
||||||
Err(errors) => {
|
Err(errors) => {
|
||||||
bail!(nicer_configuration_error(ctx, errors).await);
|
bail!(nicer_configuration_error(ctx, errors).await);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
progress!(ctx, 900);
|
progress!(ctx, 900);
|
||||||
|
|
||||||
@@ -364,7 +362,7 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
progress!(ctx, 940);
|
progress!(ctx, 940);
|
||||||
update_device_chats_handle.await?;
|
//update_device_chats_handle.await?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user