daydream

A small matrix web client written in rust
git clone git://archive.git.mtrnord.blog/daydream-mx/daydream.git
Log | Files | Refs | README | LICENSE

commit 9d4b81179316971f6c5382b588ce89f86b5c2100
parent df7c3943fc357b231250ef0703dd94ab6550268e
Author: Marcel <mtrnord1@gmail.com>
Date:   Sat,  6 Jun 2020 23:45:10 +0200

Fix logging in matrix-rust-sdk and prevent not needed ChangeRoom events

Took 4 minutes

Diffstat:
Msrc/app/components/room_list.rs | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/app/components/room_list.rs b/src/app/components/room_list.rs @@ -97,6 +97,11 @@ impl Component for RoomList { _ => false, }, Msg::ChangeRoom(room) => { + if self.state.current_room.is_some() { + if self.state.current_room.as_ref().unwrap() == &room { + return false; + } + } self.props.change_room_callback.emit(room.clone()); self.state.current_room = Some(room); true