mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Fix scroll offset for iPhoneX now that content is behind toolbar
This commit is contained in:
parent
83d3f17d44
commit
a27ee19f4e
1 changed files with 5 additions and 2 deletions
|
@ -4262,8 +4262,11 @@ typedef enum : NSUInteger {
|
||||||
|
|
||||||
CGFloat contentHeight = self.safeContentHeight;
|
CGFloat contentHeight = self.safeContentHeight;
|
||||||
|
|
||||||
CGFloat dstY
|
// bottomLayoutGuide accounts for extra offset needed on iPhoneX
|
||||||
= MAX(0, contentHeight + self.collectionView.contentInset.bottom - self.collectionView.bounds.size.height);
|
|
||||||
|
CGFloat dstY = MAX(0,
|
||||||
|
contentHeight + self.collectionView.contentInset.bottom + self.bottomLayoutGuide.length
|
||||||
|
- self.collectionView.bounds.size.height);
|
||||||
|
|
||||||
[self.collectionView setContentOffset:CGPointMake(0, dstY) animated:NO];
|
[self.collectionView setContentOffset:CGPointMake(0, dstY) animated:NO];
|
||||||
[self didScrollToBottom];
|
[self didScrollToBottom];
|
||||||
|
|
Loading…
Reference in a new issue