Add plumbing for new message/reply through core, gtk, and osx
This commit is contained in:
@@ -378,20 +378,22 @@ fn run_app(
|
||||
app.pinned_to_bottom = was_pinned;
|
||||
}
|
||||
}
|
||||
daemon::Event::MessageSent {
|
||||
daemon::Event::MessageQueued {
|
||||
conversation_id,
|
||||
outgoing_id,
|
||||
} => {
|
||||
if app.active_conversation_id.as_deref() == Some(conversation_id.as_str()) {
|
||||
app.status = outgoing_id
|
||||
.as_deref()
|
||||
.map(|id| format!("Sent ({id})"))
|
||||
.unwrap_or_else(|| "Sent".to_string());
|
||||
app.refresh_messages_in_flight = false;
|
||||
request_tx
|
||||
.send(daemon::Request::RefreshMessages { conversation_id })
|
||||
.ok();
|
||||
app.refresh_messages_in_flight = true;
|
||||
if let Some(conversation_id) = conversation_id {
|
||||
if app.active_conversation_id.as_deref() == Some(conversation_id.as_str()) {
|
||||
app.status = outgoing_id
|
||||
.as_deref()
|
||||
.map(|id| format!("Sent ({id})"))
|
||||
.unwrap_or_else(|| "Sent".to_string());
|
||||
app.refresh_messages_in_flight = false;
|
||||
request_tx
|
||||
.send(daemon::Request::RefreshMessages { conversation_id })
|
||||
.ok();
|
||||
app.refresh_messages_in_flight = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
daemon::Event::MarkedRead => {}
|
||||
@@ -638,7 +640,7 @@ fn handle_chat_keys(
|
||||
return;
|
||||
};
|
||||
request_tx
|
||||
.send(daemon::Request::SendMessage {
|
||||
.send(daemon::Request::Reply {
|
||||
conversation_id,
|
||||
text,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user