Mark all as read

This commit is contained in:
Hanh 2022-04-17 11:15:59 +08:00
parent 5bdc29c262
commit 5363904a9d
2 changed files with 6 additions and 1 deletions

View File

@ -900,7 +900,7 @@ impl DbAdapter {
Ok(())
}
pub fn mark_all_message_read(&self, account: u32, read: bool) -> anyhow::Result<()> {
pub fn mark_all_messages_read(&self, account: u32, read: bool) -> anyhow::Result<()> {
self.connection.execute("UPDATE messages SET read = ?1 WHERE account = ?2",
params![read, account])?;
Ok(())

View File

@ -539,6 +539,11 @@ impl Wallet {
Ok(())
}
pub fn mark_all_messages_read(&self, account: u32, read: bool) -> anyhow::Result<()> {
self.db.mark_all_messages_read(account, read)?;
Ok(())
}
pub fn set_lwd_url(&mut self, ld_url: &str) -> anyhow::Result<()> {
self.ld_url = ld_url.to_string();
Ok(())