Private
Public Access
1
0

daemon: updatemonitor: dont sync convo list on conversation update, only message sync

This commit is contained in:
2025-05-02 15:46:33 -07:00
parent 2519bc05ad
commit 461c37bd20
2 changed files with 6 additions and 5 deletions

View File

@@ -264,7 +264,7 @@ impl Daemon {
// Send conversations updated signal
signal_sender.send(Signal::ConversationsUpdated).await?;
log::info!(target: target::SYNC, "Synchronized {} conversations", num_conversations);
log::info!(target: target::SYNC, "List synchronized: {} conversations", num_conversations);
Ok(())
}
@@ -294,7 +294,7 @@ impl Daemon {
// Send conversations updated signal.
signal_sender.send(Signal::ConversationsUpdated).await?;
log::info!(target: target::SYNC, "Synchronized {} conversations", num_conversations);
log::info!(target: target::SYNC, "Full sync complete, {} conversations processed", num_conversations);
Ok(())
}
@@ -307,6 +307,7 @@ impl Daemon {
let conversation = database.with_repository(|r| r.get_conversation_by_guid(&conversation_id)).await?;
if conversation.is_none() {
// If the conversation doesn't exist, first do a conversation list sync.
log::warn!(target: target::SYNC, "Conversation {} not found, performing list sync", conversation_id);
Self::sync_conversation_list(database, signal_sender).await?;
}

View File

@@ -42,8 +42,8 @@ impl UpdateMonitor {
match update {
UpdateEvent::ConversationChanged(conversation) => {
log::info!(target: target::UPDATES, "Conversation changed: {:?}", conversation);
log::info!(target: target::UPDATES, "Triggering conversation list sync");
self.send_event(Event::SyncConversationList).await
log::info!(target: target::UPDATES, "Syncing new messages for conversation id: {}", conversation.guid);
self.send_event(|r| Event::SyncConversation(conversation.guid, r)).await
.unwrap_or_else(|e| {
log::error!("Failed to send daemon event: {}", e);
});