From 986c84b7689e29c4bbe6b124bee3e24707e6d51a Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 30 Apr 2018 23:12:43 +0300 Subject: Update ui AddRoom and RemoveRoom parameters --- matrix/matrix.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'matrix') diff --git a/matrix/matrix.go b/matrix/matrix.go index 2b0832b..4ed2dd9 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -283,11 +283,14 @@ func (c *Container) processOwnMembershipChange(evt *gomatrix.Event) { if membership == prevMembership { return } + room := c.GetRoom(evt.RoomID) switch membership { case "join": - c.ui.MainView().AddRoom(evt.RoomID) + c.ui.MainView().AddRoom(room) + room.HasLeft = false case "leave": - c.ui.MainView().RemoveRoom(evt.RoomID) + c.ui.MainView().RemoveRoom(room) + room.HasLeft = true case "invite": // TODO handle debug.Printf("%s invited the user to %s", evt.Sender, evt.RoomID) -- cgit v1.2.3