1 parent
47c3cd7f65
commit
cfc74d9db6
33 files changed
+850
-244
No files matched your search
@@ -162,6 +162,25 @@ pub fn refresh_unread_count(conn: &Connection, folder_name: &str) -> Result<(),
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn set_unread_count(
|
||||
conn: &Connection,
|
||||
folder_name: &str,
|
||||
unread_count: u32,
|
||||
) -> Result<(), String> {
|
||||
conn.execute(
|
||||
crate::dbq!(db_folders::Q_028),
|
||||
params![unread_count, folder_name],
|
||||
)
|
||||
.map_err(|e| format!("Failed to set unread_count: {e}"))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn mark_folder_messages_fresh(conn: &Connection, folder_name: &str) -> Result<(), String> {
|
||||
conn.execute(crate::dbq!(db_folders::Q_029), params![folder_name])
|
||||
.map_err(|e| format!("Failed to mark folder messages fresh: {e}"))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn adjust_unread_count(conn: &Connection, folder_name: &str, delta: i32) -> Result<(), String> {
|
||||
conn.execute(crate::dbq!(db_folders::Q_010), params![delta, folder_name])
|
||||
.map_err(|e| format!("Failed to adjust unread_count: {e}"))?;
|
||||
|
||||
Reference in new issue
Block a user