mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 08:32:53 +02:00
Merge branch 'develop' into ismail/4384_room_summary_store
This commit is contained in:
@@ -72,6 +72,8 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
|
||||
@property (nonatomic, strong) RoomsDirectoryCoordinatorBridgePresenter *roomsDirectoryCoordinatorBridgePresenter;
|
||||
|
||||
@property (nonatomic, strong) ExploreRoomCoordinatorBridgePresenter *exploreRoomsCoordinatorBridgePresenter;
|
||||
|
||||
@property (nonatomic, strong) SpaceFeatureUnavailablePresenter *spaceFeatureUnavailablePresenter;
|
||||
|
||||
@property (nonatomic, strong) CustomSizedPresentationController *customSizedPresentationController;
|
||||
@@ -431,7 +433,12 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
// Scroll table view to make the selected row appear at second position
|
||||
NSInteger topCellIndexPathRow = currentSelectedCellIndexPath.row ? currentSelectedCellIndexPath.row - 1: currentSelectedCellIndexPath.row;
|
||||
NSIndexPath* indexPath = [NSIndexPath indexPathForRow:topCellIndexPathRow inSection:currentSelectedCellIndexPath.section];
|
||||
[self.recentsTableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:NO];
|
||||
if ([self.recentsTableView vc_hasIndexPath:indexPath])
|
||||
{
|
||||
[self.recentsTableView scrollToRowAtIndexPath:indexPath
|
||||
atScrollPosition:UITableViewScrollPositionTop
|
||||
animated:NO];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1454,7 +1461,8 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
else if ([self canShowRoomPreviewFor:cellData.roomSummary])
|
||||
{
|
||||
// Display the room preview
|
||||
[self dispayRoomWithRoomId:cellData.roomSummary.roomId inMatrixSession:cellData.mxSession];
|
||||
[self dispayRoomWithRoomId:cellData.roomIdentifier
|
||||
inMatrixSession:cellData.mxSession];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1944,7 +1952,13 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
return;
|
||||
}
|
||||
|
||||
if (RiotSettings.shared.roomsAllowToJoinPublicRooms)
|
||||
if (self.dataSource.currentSpace)
|
||||
{
|
||||
self.exploreRoomsCoordinatorBridgePresenter = [[ExploreRoomCoordinatorBridgePresenter alloc] initWithSession:self.mainSession spaceId:self.dataSource.currentSpace.spaceId];
|
||||
self.exploreRoomsCoordinatorBridgePresenter.delegate = self;
|
||||
[self.exploreRoomsCoordinatorBridgePresenter presentFrom:self animated:YES];
|
||||
}
|
||||
else if (RiotSettings.shared.roomsAllowToJoinPublicRooms)
|
||||
{
|
||||
self.roomsDirectoryCoordinatorBridgePresenter = [[RoomsDirectoryCoordinatorBridgePresenter alloc] initWithSession:self.mainSession dataSource:[self.recentsDataSource.publicRoomsDirectoryDataSource copy]];
|
||||
self.roomsDirectoryCoordinatorBridgePresenter.delegate = self;
|
||||
@@ -2058,6 +2072,18 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
[self dispayRoomWithRoomId:roomId inMatrixSession:matrixSession];
|
||||
}
|
||||
|
||||
- (void)recentListViewController:(MXKRecentListViewController *)recentListViewController didSelectSuggestedRoom:(MXSpaceChildInfo *)childInfo
|
||||
{
|
||||
RoomPreviewData *previewData = [[RoomPreviewData alloc] initWithSpaceChildInfo:childInfo andSession:self.mainSession];
|
||||
[self startActivityIndicator];
|
||||
MXWeakify(self);
|
||||
[previewData peekInRoom:^(BOOL succeeded) {
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
[self stopActivityIndicator];
|
||||
[[AppDelegate theDelegate].masterTabBarController showRoomPreview:previewData];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UISearchBarDelegate
|
||||
|
||||
- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset
|
||||
@@ -2264,6 +2290,16 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - ExploreRoomCoordinatorBridgePresenterDelegate
|
||||
|
||||
- (void)exploreRoomCoordinatorBridgePresenterDelegateDidComplete:(ExploreRoomCoordinatorBridgePresenter *)coordinatorBridgePresenter {
|
||||
MXWeakify(self);
|
||||
[coordinatorBridgePresenter dismissWithAnimated:YES completion:^{
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
self.exploreRoomsCoordinatorBridgePresenter = nil;
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - RoomNotificationSettingsCoordinatorBridgePresenterDelegate
|
||||
-(void)roomNotificationSettingsCoordinatorBridgePresenterDelegateDidComplete:(RoomNotificationSettingsCoordinatorBridgePresenter *)coordinatorBridgePresenter
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user