@@ -7,7 +7,7 @@ mod server_params;
7
7
8
8
use anyhow:: { bail, ensure, Context as _, Result } ;
9
9
use async_std:: prelude:: * ;
10
- use async_std:: task;
10
+ // use async_std::task;
11
11
use itertools:: Itertools ;
12
12
use job:: Action ;
13
13
use percent_encoding:: { utf8_percent_encode, NON_ALPHANUMERIC } ;
@@ -163,8 +163,8 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
163
163
DC_LP_AUTH_NORMAL as i32
164
164
} ;
165
165
166
- let ctx2 = ctx. clone ( ) ;
167
- let update_device_chats_handle = task:: spawn ( async move { ctx2. update_device_chats ( ) . await } ) ;
166
+ // let ctx2 = ctx.clone();
167
+ // let update_device_chats_handle = task::spawn(async move { ctx2.update_device_chats().await });
168
168
169
169
// Step 1: Load the parameters and check email-address and password
170
170
@@ -258,7 +258,7 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
258
258
. cloned ( )
259
259
. collect ( ) ;
260
260
261
- let smtp_config_task = task:: spawn ( async move {
261
+ // let smtp_config_task = task::spawn(async move {
262
262
let mut smtp_configured = false ;
263
263
let mut errors = Vec :: new ( ) ;
264
264
for smtp_server in smtp_servers {
@@ -278,12 +278,10 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
278
278
}
279
279
}
280
280
281
- if smtp_configured {
282
- Ok ( smtp_param)
283
- } else {
284
- Err ( errors)
281
+ if !smtp_configured {
282
+ bail ! ( nicer_configuration_error( ctx, errors) . await ) ;
285
283
}
286
- } ) ;
284
+ // });
287
285
288
286
progress ! ( ctx, 600 ) ;
289
287
@@ -323,14 +321,14 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
323
321
progress ! ( ctx, 850 ) ;
324
322
325
323
// Wait for SMTP configuration
326
- match smtp_config_task. await {
324
+ /* match smtp_config_task.await {
327
325
Ok(smtp_param) => {
328
326
param.smtp = smtp_param;
329
327
}
330
328
Err(errors) => {
331
329
bail!(nicer_configuration_error(ctx, errors).await);
332
330
}
333
- }
331
+ }*/
334
332
335
333
progress ! ( ctx, 900 ) ;
336
334
@@ -364,7 +362,7 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
364
362
. await ;
365
363
366
364
progress ! ( ctx, 940 ) ;
367
- update_device_chats_handle. await ?;
365
+ // update_device_chats_handle.await?;
368
366
369
367
Ok ( ( ) )
370
368
}
0 commit comments