Private
Public Access
1
0

fix all warnings

This commit is contained in:
2025-06-16 19:25:24 -07:00
parent 9d591dffc5
commit 75fe4d4608
8 changed files with 18 additions and 110 deletions

View File

@@ -29,7 +29,7 @@ use kordophone_db::{
use kordophone::api::http_client::HTTPAPIClient;
use kordophone::api::APIInterface;
use kordophone::model::outgoing_message::OutgoingMessage;
use kordophone::model::ConversationID;
use kordophone::model::{ConversationID, MessageID};
mod update_monitor;
use update_monitor::{UpdateMonitor, UpdateMonitorCommand};
@@ -57,8 +57,6 @@ pub enum DaemonError {
pub type DaemonResult<T> = Result<T, Box<dyn Error + Send + Sync>>;
type DaemonClient = HTTPAPIClient<DatabaseAuthenticationStore>;
pub mod target {
pub static SYNC: &str = "sync";
pub static EVENT: &str = "event";
@@ -392,14 +390,6 @@ impl Daemon {
self.signal_receiver.take().unwrap()
}
async fn get_conversations(&mut self) -> Vec<Conversation> {
self.database
.lock()
.await
.with_repository(|r| r.all_conversations(i32::MAX, 0).unwrap())
.await
}
async fn get_conversations_limit_offset(
&mut self,
limit: i32,
@@ -415,7 +405,7 @@ impl Daemon {
async fn get_messages(
&mut self,
conversation_id: String,
last_message_id: Option<String>,
_last_message_id: Option<MessageID>,
) -> Vec<Message> {
// Get outgoing messages for this conversation.
let empty_vec: Vec<OutgoingMessage> = vec![];
@@ -601,10 +591,6 @@ impl Daemon {
self.database.with_settings(|s| settings.save(s)).await
}
async fn get_client(&mut self) -> Result<HTTPAPIClient<DatabaseAuthenticationStore>> {
Self::get_client_impl(&mut self.database).await
}
async fn get_client_impl(
database: &mut Arc<Mutex<Database>>,
) -> Result<HTTPAPIClient<DatabaseAuthenticationStore>> {