mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
BugFix: Media Picker: user's albums are missing
https://github.com/vector-im/vector-ios/issues/208
This commit is contained in:
parent
2a4cfebc9e
commit
4790dac377
1 changed files with 9 additions and 3 deletions
|
@ -376,7 +376,10 @@ static void *RecordingContext = &RecordingContext;
|
|||
// Update Captures collection display
|
||||
if (recentCaptures.count)
|
||||
{
|
||||
self.recentCapturesCollectionContainerViewHeightConstraint.constant = (ceil(recentCaptures.count / 4.0) * ((self.view.frame.size.width - 6) / 4)) + 10;
|
||||
// recents Collection is limited to the first 12 assets
|
||||
NSInteger recentsCount = ((recentCaptures.count > 12) ? 12 : recentCaptures.count);
|
||||
|
||||
self.recentCapturesCollectionContainerViewHeightConstraint.constant = (ceil(recentsCount / 4.0) * ((self.view.frame.size.width - 6) / 4)) + 10;
|
||||
[self.recentCapturesCollectionContainerView needsUpdateConstraints];
|
||||
|
||||
[self.recentCapturesCollectionView reloadData];
|
||||
|
@ -429,7 +432,10 @@ static void *RecordingContext = &RecordingContext;
|
|||
if (recentCaptures.count)
|
||||
{
|
||||
self.recentCapturesCollectionView.hidden = NO;
|
||||
self.recentCapturesCollectionContainerViewHeightConstraint.constant = (ceil(recentCaptures.count / 4.0) * ((self.view.frame.size.width - 6) / 4)) + 10;
|
||||
|
||||
// recents Collection is limited to the first 12 assets
|
||||
NSInteger recentsCount = ((recentCaptures.count > 12) ? 12 : recentCaptures.count);
|
||||
self.recentCapturesCollectionContainerViewHeightConstraint.constant = (ceil(recentsCount / 4.0) * ((self.view.frame.size.width - 6) / 4)) + 10;
|
||||
[self.recentCapturesCollectionContainerView needsUpdateConstraints];
|
||||
|
||||
[self.recentCapturesCollectionView reloadData];
|
||||
|
@ -1308,7 +1314,7 @@ static void *RecordingContext = &RecordingContext;
|
|||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
||||
{
|
||||
// Collection is limited to the first 12 assets
|
||||
return (recentCaptures.count > 12) ? 12 : recentCaptures.count;
|
||||
return ((recentCaptures.count > 12) ? 12 : recentCaptures.count);
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
|
|
Loading…
Reference in a new issue