Skip to content

Commit cdba015

Browse files
committed
Make sure the top unread bar appears if a channel has a saved scroll position
1 parent ab4316b commit cdba015

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

IRCCloud/Classes/EventsTableView.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -873,13 +873,13 @@ -(void)setBuffer:(Buffer *)buffer {
873873

874874
- (void)_scrollToBottom {
875875
[_lock lock];
876+
_scrollTimer = nil;
877+
_buffer.scrolledUp = NO;
878+
_buffer.scrolledUpFrom = -1;
876879
if(_data.count) {
877880
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:_data.count-1 inSection:0] atScrollPosition: UITableViewScrollPositionBottom animated: NO];
878881
[self scrollViewDidScroll:self.tableView];
879882
}
880-
_scrollTimer = nil;
881-
_buffer.scrolledUp = NO;
882-
_buffer.scrolledUpFrom = -1;
883883
[_lock unlock];
884884
}
885885

@@ -1064,7 +1064,7 @@ - (void)refresh {
10641064
if(_data.count) {
10651065
int firstRow = [[[self.tableView indexPathsForVisibleRows] objectAtIndex:0] row];
10661066
if(_lastSeenEidPos >=0 && firstRow > _lastSeenEidPos) {
1067-
if(!_buffer.scrolledUp) {
1067+
if(_topUnreadView.alpha == 0) {
10681068
[UIView beginAnimations:nil context:nil];
10691069
[UIView setAnimationDuration:0.1];
10701070
_topUnreadView.alpha = 1;

0 commit comments

Comments
 (0)