update room kind on new message

This commit is contained in:
2026-03-12 16:49:57 +07:00
parent c9d1f1c8c3
commit d43383bed1
2 changed files with 17 additions and 5 deletions

View File

@@ -57,7 +57,11 @@ impl SendReport {
/// Returns true if the send is pending.
pub fn pending(&self) -> bool {
self.output.is_none() && self.error.is_none()
self.error.is_none()
&& self
.output
.as_ref()
.is_some_and(|o| o.success.is_empty() && o.failed.is_empty())
}
/// Returns true if the send was successful.
@@ -228,10 +232,8 @@ impl Room {
/// Sets this room is ongoing conversation
pub fn set_ongoing(&mut self, cx: &mut Context<Self>) {
if self.kind != RoomKind::Ongoing {
self.kind = RoomKind::Ongoing;
cx.notify();
}
self.kind = RoomKind::Ongoing;
cx.notify();
}
/// Updates the creation timestamp of the room