From b45fc82b3413fca41ea3f2029669dc1c3d1ba78f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 25 Mar 2019 16:26:48 +0300 Subject: Fix coalescing --- Juick/ViewControllers/MessagesViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Juick/ViewControllers') diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m index 09e84ec..5d47d01 100644 --- a/Juick/ViewControllers/MessagesViewController.m +++ b/Juick/ViewControllers/MessagesViewController.m @@ -70,7 +70,7 @@ NSString* const messageCellIdentifier = @"messageCell"; [self.tableView endUpdates]; [self.refreshControl endRefreshing]; if (self.shouldScrollToUnreadOnRefresh) { - NSInteger itemToScroll = [self.firstUnread integerValue] || self.messages.count - 1; + NSInteger itemToScroll = [self.firstUnread integerValue] ? : self.messages.count - 1; NSIndexPath *lastRow = [NSIndexPath indexPathForRow:itemToScroll inSection:0]; [self.tableView scrollToRowAtIndexPath:lastRow atScrollPosition:UITableViewScrollPositionBottom animated:NO]; self.firstUnread = nil; -- cgit v1.2.3