mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-30 00:02:47 +00:00
Merge pull request #832 from vector-im/fix_app_crash_table_view_data_source_not_set
Should fix App crash on exception: "UITableView dataSource is not set".
This commit is contained in:
commit
e36fee814d
1 changed files with 15 additions and 6 deletions
|
@ -716,7 +716,7 @@
|
|||
previewHeader.mxRoom = self.roomDataSource.room;
|
||||
|
||||
// Force the layout of subviews (some constraints may have been updated)
|
||||
[self.view layoutIfNeeded];
|
||||
[self forceLayoutRefresh];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -735,7 +735,7 @@
|
|||
expandedHeader.mxRoom = self.roomDataSource.room;
|
||||
|
||||
// Force the layout of subviews (some constraints may have been updated)
|
||||
[self.view layoutIfNeeded];
|
||||
[self forceLayoutRefresh];
|
||||
}
|
||||
|
||||
// Restore tool bar view and room activities view if none
|
||||
|
@ -934,6 +934,15 @@
|
|||
|
||||
#pragma mark - Internals
|
||||
|
||||
- (void)forceLayoutRefresh
|
||||
{
|
||||
// Sanity check: check whether the table view data source is set.
|
||||
if (self.bubblesTableView.dataSource)
|
||||
{
|
||||
[self.view layoutIfNeeded];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)isRoomPreview
|
||||
{
|
||||
// Check first whether some preview data are defined.
|
||||
|
@ -981,7 +990,7 @@
|
|||
expandedHeader.mxRoom = self.roomDataSource.room;
|
||||
|
||||
// Force the layout of subviews (some constraints may have been updated)
|
||||
[self.view layoutIfNeeded];
|
||||
[self forceLayoutRefresh];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1144,7 +1153,7 @@
|
|||
}
|
||||
|
||||
// Force to render the view
|
||||
[self.view layoutIfNeeded];
|
||||
[self forceLayoutRefresh];
|
||||
|
||||
}
|
||||
completion:^(BOOL finished){
|
||||
|
@ -1246,7 +1255,7 @@
|
|||
self.bubblesTableViewTopConstraint.constant = 0;
|
||||
|
||||
// Force to render the view
|
||||
[self.view layoutIfNeeded];
|
||||
[self forceLayoutRefresh];
|
||||
|
||||
}
|
||||
completion:^(BOOL finished){
|
||||
|
@ -1342,7 +1351,7 @@
|
|||
}
|
||||
|
||||
// Force to render the view
|
||||
[self.view layoutIfNeeded];
|
||||
[self forceLayoutRefresh];
|
||||
|
||||
}
|
||||
completion:^(BOOL finished){
|
||||
|
|
Loading…
Reference in a new issue