diff --git a/src/imap.rs b/src/imap.rs index a34e8590e..b08bf94cc 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -1999,23 +1999,6 @@ async fn get_uidvalidity(context: &Context, transport_id: u32, folder: &str) -> .unwrap_or(0)) } -pub(crate) async fn set_modseq( - context: &Context, - transport_id: u32, - folder: &str, - modseq: u64, -) -> Result<()> { - context - .sql - .execute( - "INSERT INTO imap_sync (transport_id, folder, modseq) VALUES (?,?,?) - ON CONFLICT(transport_id, folder) DO UPDATE SET modseq=excluded.modseq", - (transport_id, folder, modseq), - ) - .await?; - Ok(()) -} - /// Builds a list of sequence/uid sets. The returned sets have each no more than around 1000 /// characters because according to /// command lines should not be much more than 1000 chars (servers should allow at least 8000 chars) diff --git a/src/imap/select_folder.rs b/src/imap/select_folder.rs index 78c743b33..94de507db 100644 --- a/src/imap/select_folder.rs +++ b/src/imap/select_folder.rs @@ -3,7 +3,7 @@ use anyhow::Context as _; use super::session::Session as ImapSession; -use super::{get_uid_next, get_uidvalidity, set_modseq, set_uid_next, set_uidvalidity}; +use super::{get_uid_next, get_uidvalidity, set_uid_next, set_uidvalidity}; use crate::context::Context; use crate::ensure_and_debug_assert; use crate::log::warn; @@ -200,9 +200,6 @@ impl ImapSession { return Ok(true); } - // UIDVALIDITY is modified, reset highest seen MODSEQ. - set_modseq(context, transport_id, folder, 0).await?; - // ============== uid_validity has changed or is being set the first time. ============== let new_uid_next = new_uid_next.unwrap_or_default();