From 4d8eadad4f68584d39898bf8d0ba1d24de02f5e6 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 19 Sep 2017 10:21:20 +0100 Subject: [PATCH] Clarify comment --- src/stores/RoomViewStore.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/stores/RoomViewStore.js b/src/stores/RoomViewStore.js index bd16c7a1d5..795345242e 100644 --- a/src/stores/RoomViewStore.js +++ b/src/stores/RoomViewStore.js @@ -249,11 +249,15 @@ class RoomViewStore extends Store { // // This flag remains true after the room has been sucessfully joined, // (this store doesn't listen for the appropriate member events) - // so you should always consider the room to be joined if the user's - // member events says they are joined. + // so you should always observe the joined state from the member event + // if a room object is present. // ie. The correct logic is: - // if (room && myMember.membership == 'joined') { - // // user is joined to the room + // if (room) { + // if (myMember.membership == 'joined') { + // // user is joined to the room + // } else { + // // Not joined + // } // } else { // if (RoomViewStore.isJoining()) { // // show spinner