mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-14 03:40:00 +02:00
Merge pull request #2013 from vector-im/riot_2005
Fix user interaction disabled in master view of UISplitViewContoller when selecting a room
This commit is contained in:
@@ -757,8 +757,10 @@
|
||||
{
|
||||
// Avoid multiple openings of rooms
|
||||
self.userInteractionEnabled = NO;
|
||||
|
||||
[[AppDelegate theDelegate].masterTabBarController selectRoomWithId:roomId andEventId:nil inMatrixSession:matrixSession];
|
||||
|
||||
[[AppDelegate theDelegate].masterTabBarController selectRoomWithId:roomId andEventId:nil inMatrixSession:matrixSession completion:^{
|
||||
self.userInteractionEnabled = YES;
|
||||
}];
|
||||
}
|
||||
|
||||
// Disable UI interactions in this screen while we are going to open another screen.
|
||||
|
||||
@@ -72,6 +72,16 @@
|
||||
*/
|
||||
- (void)selectRoomWithId:(NSString*)roomId andEventId:(NSString*)eventId inMatrixSession:(MXSession*)mxSession;
|
||||
|
||||
/**
|
||||
Open the room with the provided identifier in a specific matrix session.
|
||||
|
||||
@param roomId the room identifier.
|
||||
@param eventId if not nil, the room will be opened on this event.
|
||||
@param mxSession the matrix session in which the room should be available.
|
||||
@param completion the block to execute at the end of the operation.
|
||||
*/
|
||||
- (void)selectRoomWithId:(NSString*)roomId andEventId:(NSString*)eventId inMatrixSession:(MXSession*)matrixSession completion:(void (^)(void))completion;
|
||||
|
||||
/**
|
||||
Open the RoomViewController to display the preview of a room that is unknown for the user.
|
||||
|
||||
|
||||
@@ -401,12 +401,21 @@
|
||||
}
|
||||
|
||||
- (void)selectRoomWithId:(NSString*)roomId andEventId:(NSString*)eventId inMatrixSession:(MXSession*)matrixSession
|
||||
{
|
||||
[self selectRoomWithId:roomId andEventId:eventId inMatrixSession:matrixSession completion:nil];
|
||||
}
|
||||
|
||||
- (void)selectRoomWithId:(NSString*)roomId andEventId:(NSString*)eventId inMatrixSession:(MXSession*)matrixSession completion:(void (^)(void))completion
|
||||
{
|
||||
if (_selectedRoomId && [_selectedRoomId isEqualToString:roomId]
|
||||
&& _selectedEventId && [_selectedEventId isEqualToString:eventId]
|
||||
&& _selectedRoomSession && _selectedRoomSession == matrixSession)
|
||||
{
|
||||
// Nothing to do
|
||||
if (completion)
|
||||
{
|
||||
completion();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -420,15 +429,24 @@
|
||||
MXWeakify(self);
|
||||
[self dataSourceOfRoomToDisplay:^(MXKRoomDataSource *roomDataSource) {
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
|
||||
self->_selectedRoomDataSource = roomDataSource;
|
||||
|
||||
|
||||
[self performSegueWithIdentifier:@"showRoomDetails" sender:self];
|
||||
|
||||
if (completion)
|
||||
{
|
||||
completion();
|
||||
}
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self releaseSelectedItem];
|
||||
if (completion)
|
||||
{
|
||||
completion();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user