Hide jump to unread button on threads, override scroll to bottom action, fix #5264

This commit is contained in:
ismailgulek
2021-12-08 16:04:11 +03:00
parent 78b402c232
commit 254e714fc5
3 changed files with 29 additions and 2 deletions
+9 -2
View File
@@ -4510,7 +4510,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
[self checkReadMarkerVisibility];
// Switch back to the live mode when the user scrolls to the bottom of the non live timeline.
if (!self.roomDataSource.isLive && ![self isRoomPreview])
if (!self.roomDataSource.isLive && !self.roomDataSource.threadId && ![self isRoomPreview])
{
CGFloat contentBottomPosY = self.bubblesTableView.contentOffset.y + self.bubblesTableView.frame.size.height - self.bubblesTableView.adjustedContentInset.bottom;
if (contentBottomPosY >= self.bubblesTableView.contentSize.height && ![self.roomDataSource.timeline canPaginate:MXTimelineDirectionForwards])
@@ -5080,7 +5080,14 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
// Retrieve the unread messages count
NSUInteger unreadCount = self.roomDataSource.room.summary.localUnreadEventCount;
self.scrollToBottomBadgeLabel.text = unreadCount ? [NSString stringWithFormat:@"%lu", unreadCount] : nil;
if (!self.roomDataSource.threadId)
{
self.scrollToBottomBadgeLabel.text = unreadCount ? [NSString stringWithFormat:@"%lu", unreadCount] : nil;
}
else
{
self.scrollToBottomBadgeLabel.text = nil;
}
self.scrollToBottomHidden = NO;
}
else