[fractal] room: open default room when avaible
- From: Alexandre Franke <afranke src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal] room: open default room when avaible
- Date: Wed, 2 Jan 2019 22:44:27 +0000 (UTC)
commit 78dfdc1e971221436ad795c1ceb1136dc7162ae8
Author: Julian Sparber <julian sparber net>
Date: Fri Dec 28 18:21:23 2018 +0100
room: open default room when avaible
fractal-gtk/src/app/backend_loop.rs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/fractal-gtk/src/app/backend_loop.rs b/fractal-gtk/src/app/backend_loop.rs
index 6a12f91a..739ec472 100644
--- a/fractal-gtk/src/app/backend_loop.rs
+++ b/fractal-gtk/src/app/backend_loop.rs
@@ -103,9 +103,14 @@ pub fn backend_loop(rx: Receiver<BKResponse>) {
let s = Some(since);
APPOP!(synced, (s));
}
- Ok(BKResponse::Rooms(rooms, _default)) => {
+ Ok(BKResponse::Rooms(rooms, default)) => {
let clear_room_list = true;
APPOP!(set_rooms, (rooms, clear_room_list));
+ // Open the newly joined room
+ if let Some(room) = default {
+ let room_id = room.id;
+ APPOP!(set_active_room_by_id, (room_id));
+ }
}
Ok(BKResponse::NewRooms(rooms)) => {
let clear_room_list = false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]