mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 17:42:45 +02:00
Chat room read marker:
- Do not launch the read marker animation if the marker is outside the visible area.
This commit is contained in:
@@ -3443,18 +3443,24 @@
|
||||
if (readMarkerTableViewCell && isAppeared)
|
||||
{
|
||||
// Check whether the read marker is visible
|
||||
CGFloat contentTopOffsetY = self.bubblesTableView.contentOffset.y + self.bubblesTableView.contentInset.top;
|
||||
if (contentTopOffsetY <= readMarkerTableViewCell.frame.origin.y + readMarkerTableViewCell.readMarkerView.frame.origin.y)
|
||||
CGFloat contentTopPosY = self.bubblesTableView.contentOffset.y + self.bubblesTableView.contentInset.top;
|
||||
CGFloat readMarkerViewPosY = readMarkerTableViewCell.frame.origin.y + readMarkerTableViewCell.readMarkerView.frame.origin.y;
|
||||
if (contentTopPosY <= readMarkerViewPosY)
|
||||
{
|
||||
// Launch animation
|
||||
[self animateReadMarkerView];
|
||||
|
||||
// Disable the read marker display when it has been rendered once.
|
||||
self.roomDataSource.showReadMarker = NO;
|
||||
[self refreshJumpToLastUnreadBannerDisplay];
|
||||
|
||||
// Update the read marker position according the events acknowledgement in this view controller.
|
||||
self.updateRoomReadMarker = YES;
|
||||
// Compute the max vertical position visible according to contentOffset
|
||||
CGFloat contentBottomPosY = self.bubblesTableView.contentOffset.y + self.bubblesTableView.frame.size.height - self.bubblesTableView.contentInset.bottom;
|
||||
if (readMarkerViewPosY <= contentBottomPosY)
|
||||
{
|
||||
// Launch animation
|
||||
[self animateReadMarkerView];
|
||||
|
||||
// Disable the read marker display when it has been rendered once.
|
||||
self.roomDataSource.showReadMarker = NO;
|
||||
[self refreshJumpToLastUnreadBannerDisplay];
|
||||
|
||||
// Update the read marker position according the events acknowledgement in this view controller.
|
||||
self.updateRoomReadMarker = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user