Browse Source

melib/imap: add default capabilities to SUPPORTED_CAPABILITIES

jmap
Manos Pitsidianakis 2 years ago
parent
commit
b8e4a35963
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 3
      melib/src/backends/imap.rs
  2. 5
      ui/src/components/mail/status.rs

3
melib/src/backends/imap.rs

@ -47,7 +47,8 @@ use std::str::FromStr;
use std::sync::{Arc, Mutex, RwLock};
pub type UID = usize;
pub static SUPPORTED_CAPABILITIES: &'static [&'static str] = &["IDLE"];
pub static SUPPORTED_CAPABILITIES: &'static [&'static str] =
&["IDLE", "LOGIN", "LOGINDISABLED", "ENABLE", "IMAP4REV1"];
#[derive(Debug, Default)]
pub struct EnvelopeCache {

5
ui/src/components/mail/status.rs

@ -410,7 +410,10 @@ impl Component for AccountStatus {
);
let (width, height) = self.content.size();
if melib::backends::imap::SUPPORTED_CAPABILITIES.contains(&cap.as_str()) {
if melib::backends::imap::SUPPORTED_CAPABILITIES
.iter()
.any(|c| cap.eq_ignore_ascii_case(c))
{
write_string_to_grid(
"supported",
&mut self.content,

Loading…
Cancel
Save