Room peeking support

- Update preview header handling.
This commit is contained in:
giomfo
2016-06-10 17:15:42 +02:00
parent 3106821c19
commit 36846071ba
10 changed files with 254 additions and 166 deletions
+13 -3
View File
@@ -43,14 +43,22 @@
return self;
}
- (void)dealloc
{
if (_roomDataSource)
{
[_roomDataSource destroy];
_roomDataSource = nil;
}
_emailInvitation = nil;
}
- (void)peekInRoom:(void (^)(BOOL successed))completion
{
[_mxSession peekInRoomWithRoomId:_roomId success:^(MXPeekingRoom *peekingRoom) {
// Create the room data source
// It will be automatically released in the destroy metho of the RoomViewController
// that will display the data source
// FIXME: release this room data source like it should be
_roomDataSource = [[RoomDataSource alloc] initWithPeekingRoom:peekingRoom andInitialEventId:_eventId];
[_roomDataSource finalizeInitialization];
@@ -60,7 +68,9 @@
completion(YES);
} failure:^(NSError *error) {
completion(NO);
}];
}