daemon: adds conversation list limit, fixes auth saving in db auth store
This commit is contained in:
@@ -84,11 +84,14 @@ impl<'a> Repository<'a> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
pub fn all_conversations(&mut self) -> Result<Vec<Conversation>> {
|
||||
pub fn all_conversations(&mut self, limit: i32, offset: i32) -> Result<Vec<Conversation>> {
|
||||
use crate::schema::conversations::dsl::*;
|
||||
use crate::schema::participants::dsl::*;
|
||||
|
||||
let db_conversations = conversations
|
||||
.order(schema::conversations::date.desc())
|
||||
.offset(offset as i64)
|
||||
.limit(limit as i64)
|
||||
.load::<ConversationRecord>(self.connection)?;
|
||||
|
||||
let mut result = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user