update on time

This commit is contained in:
Adam 2024-08-27 00:22:41 -04:00
parent 89344c6042
commit d04908ed1e

View file

@ -128,16 +128,6 @@ impl MessageHandler {
.name
.clone();
// Send client updates
self.state
.broadcast_tx
.send(meta_server_summary_update(&self.state))
.unwrap();
self.state
.broadcast_tx
.send(meta_chat_update(&self.state))
.unwrap();
// Announce User left in chat
let msg = ChatMessage {
text: format!("{0} left.", &user_name),
@ -161,7 +151,6 @@ impl MessageHandler {
}
// Move user to offline
// This should probably happen first/immediately but moving down here avoids a clone
self.state.offline_users.write().unwrap().insert(
user_name,
self.state
@ -171,5 +160,15 @@ impl MessageHandler {
.remove(&addr)
.unwrap(),
);
// Send client updates
self.state
.broadcast_tx
.send(meta_server_summary_update(&self.state))
.unwrap();
self.state
.broadcast_tx
.send(meta_chat_update(&self.state))
.unwrap();
}
}