kptui: update for new events
Some checks failed
Core RPM Release / build-core-rpm-release (push) Failing after 11m50s
Some checks failed
Core RPM Release / build-core-rpm-release (push) Failing after 11m50s
This commit is contained in:
@@ -394,12 +394,38 @@ fn run_app(
|
||||
app.refresh_messages_in_flight = true;
|
||||
}
|
||||
}
|
||||
daemon::Event::MarkedRead => {}
|
||||
daemon::Event::MarkedRead
|
||||
| daemon::Event::ConversationListSyncTriggered
|
||||
| daemon::Event::AllConversationsSyncTriggered
|
||||
| daemon::Event::AttachmentDownloadQueued { .. }
|
||||
| daemon::Event::AttachmentUploadQueued { .. }
|
||||
| daemon::Event::AttachmentUploaded { .. }
|
||||
| daemon::Event::AttachmentInfo { .. }
|
||||
| daemon::Event::SettingsLoaded(_)
|
||||
| daemon::Event::SettingsSaved => {}
|
||||
daemon::Event::ConversationSyncTriggered { conversation_id } => {
|
||||
if app.active_conversation_id.as_deref() == Some(conversation_id.as_str()) {
|
||||
app.status = "Syncing…".to_string();
|
||||
}
|
||||
}
|
||||
daemon::Event::AttachmentDownloaded { .. } => {
|
||||
if let Some(cid) = app.active_conversation_id.clone() {
|
||||
if !app.refresh_messages_in_flight {
|
||||
request_tx
|
||||
.send(daemon::Request::RefreshMessages {
|
||||
conversation_id: cid,
|
||||
})
|
||||
.ok();
|
||||
app.refresh_messages_in_flight = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
daemon::Event::AttachmentDownloadFailed {
|
||||
attachment_guid,
|
||||
error,
|
||||
} => {
|
||||
app.status = format!("Attachment {attachment_guid} failed: {error}");
|
||||
}
|
||||
daemon::Event::ConversationsUpdated => {
|
||||
if !app.refresh_conversations_in_flight {
|
||||
request_tx.send(daemon::Request::RefreshConversations).ok();
|
||||
|
||||
Reference in New Issue
Block a user