diff --git a/Vector/Model/Room/RoomPreviewData.h b/Vector/Model/Room/RoomPreviewData.h index 90b2c9198..14320f8fe 100644 --- a/Vector/Model/Room/RoomPreviewData.h +++ b/Vector/Model/Room/RoomPreviewData.h @@ -59,7 +59,7 @@ /** The RoomDataSource to peek into the room. - Note: this object is creating when [self peekInRoom:] succeeds. + Note: this object is created when [self peekInRoom:] succeeds. */ @property (nonatomic, readonly) RoomDataSource *roomDataSource; @@ -74,7 +74,7 @@ - (instancetype)initWithRoomId:(NSString*)roomId emailInvitationParams:(NSDictionary*)emailInvitationParams andSession:(MXSession*)mxSession; /** - Attempt to peek into room to get room data (state, messages history, etc). + Attempt to peek into the room to get room data (state, messages history, etc). The operation succeeds only if the room history is world_readable. diff --git a/Vector/ViewController/HomeViewController.m b/Vector/ViewController/HomeViewController.m index e3b85973b..a65197ab1 100644 --- a/Vector/ViewController/HomeViewController.m +++ b/Vector/ViewController/HomeViewController.m @@ -404,7 +404,8 @@ MXSession *mxSession = _currentRoomViewController.roomDataSource.mxSession; MXKRoomDataSourceManager *roomDataSourceManager = [MXKRoomDataSourceManager sharedManagerForMatrixSession:mxSession]; - // Let the manager release this live room data source + // Let the manager release live room data sources where the user is in + // and force close all others. BOOL forceClose = !_currentRoomViewController.roomDataSource.isLive || _currentRoomViewController.roomDataSource.isPeeking; [roomDataSourceManager closeRoomDataSource:_currentRoomViewController.roomDataSource forceClose:forceClose]; }