Skip to content
This repository has been archived by the owner on Aug 24, 2024. It is now read-only.

Commit

Permalink
fix: change room action doesn't render messages (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
b-avb authored Feb 28, 2024
1 parent 5868da1 commit c5b641e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/hooks/use_chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ pub fn use_chat(cx: &ScopeState) -> &UseChatState {
}
});

use_effect(cx, &(room.get().id), |id| {
to_owned![task_timeline, from];
async move {
from.set(None);
task_timeline.send(true);
}
});

cx.use_hook(move || UseChatState {
inner: ChatState {
messages: messages.get().clone(),
Expand Down

0 comments on commit c5b641e

Please sign in to comment.