From 765c95de398e60226a2932ca9edcb68f5901a4f2 Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 10 Nov 2023 03:02:45 +0000 Subject: [PATCH] refactor(imap): do not check if IDLE is supported twice We already check if IDLE is supported outside of idle() --- src/imap/idle.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/imap/idle.rs b/src/imap/idle.rs index 782935df5..e2786e9af 100644 --- a/src/imap/idle.rs +++ b/src/imap/idle.rs @@ -23,14 +23,6 @@ impl Session { ) -> Result<(Self, InterruptInfo)> { use futures::future::FutureExt; - if context.get_config_bool(Config::DisableIdle).await? { - bail!("IMAP IDLE is disabled"); - } - - if !self.can_idle() { - bail!("IMAP server does not have IDLE capability"); - } - let mut info = Default::default(); self.select_folder(context, Some(folder)).await?;