mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
Improve documentation and comments
This commit is contained in:
committed by
holger krekel
parent
47f8da6532
commit
f778957caf
@@ -1,3 +1,5 @@
|
||||
//! # Chat module
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use itertools::Itertools;
|
||||
@@ -37,6 +39,7 @@ pub struct Chat {
|
||||
}
|
||||
|
||||
impl Chat {
|
||||
/// Loads chat from the database by its ID.
|
||||
pub fn load_from_db(context: &Context, chat_id: u32) -> Result<Self, Error> {
|
||||
let res = context.sql.query_row(
|
||||
"SELECT c.id,c.type,c.name, c.grpid,c.param,c.archived, \
|
||||
@@ -226,6 +229,7 @@ impl Chat {
|
||||
color
|
||||
}
|
||||
|
||||
/// Returns true if the chat is archived.
|
||||
pub fn is_archived(&self) -> bool {
|
||||
self.archived
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user