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:
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