Clarify comment

pull/21833/head
David Baker 2017-09-19 10:21:20 +01:00
parent 59ee401f9c
commit 4d8eadad4f
1 changed files with 8 additions and 4 deletions

View File

@ -249,12 +249,16 @@ class RoomViewStore extends Store {
// //
// This flag remains true after the room has been sucessfully joined, // This flag remains true after the room has been sucessfully joined,
// (this store doesn't listen for the appropriate member events) // (this store doesn't listen for the appropriate member events)
// so you should always consider the room to be joined if the user's // so you should always observe the joined state from the member event
// member events says they are joined. // if a room object is present.
// ie. The correct logic is: // ie. The correct logic is:
// if (room && myMember.membership == 'joined') { // if (room) {
// if (myMember.membership == 'joined') {
// // user is joined to the room // // user is joined to the room
// } else { // } else {
// // Not joined
// }
// } else {
// if (RoomViewStore.isJoining()) { // if (RoomViewStore.isJoining()) {
// // show spinner // // show spinner
// } else { // } else {