Respond to CR.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent 5cf0441f55
commit 669e0644ea

@ -370,18 +370,13 @@
// visible. The threads often change ordering while in conversation view due // visible. The threads often change ordering while in conversation view due
// to incoming & outgoing messages. // to incoming & outgoing messages.
if (self.lastThread) { if (self.lastThread) {
NSIndexPath *indexPathOfLastThread = nil; __block NSIndexPath *indexPathOfLastThread = nil;
NSUInteger numberOfSections = [self.threadMappings numberOfSections]; [self.uiDatabaseConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) {
for (NSUInteger section = 0; !indexPathOfLastThread && section < numberOfSections; section++) { indexPathOfLastThread =
NSUInteger numberOfItems = [self.threadMappings numberOfItemsInSection:section]; [[transaction extension:TSThreadDatabaseViewExtensionName] indexPathForKey:self.lastThread.uniqueId
for (NSUInteger row = 0; !indexPathOfLastThread && row < numberOfItems; row++) { inCollection:[TSThread collection]
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:(NSInteger)row inSection:(NSInteger)section]; withMappings:self.threadMappings];
TSThread *thread = [self threadForIndexPath:indexPath]; }];
if ([thread.uniqueId isEqualToString:self.lastThread.uniqueId]) {
indexPathOfLastThread = indexPath;
}
}
}
if (indexPathOfLastThread) { if (indexPathOfLastThread) {
[self.tableView scrollToRowAtIndexPath:indexPathOfLastThread [self.tableView scrollToRowAtIndexPath:indexPathOfLastThread

@ -644,7 +644,7 @@
"IN_CALL_TERMINATED" = "Call Ended."; "IN_CALL_TERMINATED" = "Call Ended.";
/* Label reminding the user that they are in archive mode. */ /* Label reminding the user that they are in archive mode. */
"INBOX_VIEW_ARCHIVE_MODE_REMINDER" = "You're in archive mode. Tap to return to your Inbox."; "INBOX_VIEW_ARCHIVE_MODE_REMINDER" = "You are viewing your archived messages. Tap to return to your Inbox.";
/* Multiline label explaining how to show names instead of phone numbers in your inbox */ /* Multiline label explaining how to show names instead of phone numbers in your inbox */
"INBOX_VIEW_MISSING_CONTACTS_PERMISSION" = "To see the names of your contacts, update your system settings to allow contact access."; "INBOX_VIEW_MISSING_CONTACTS_PERMISSION" = "To see the names of your contacts, update your system settings to allow contact access.";

Loading…
Cancel
Save