Respond to CR.

// FREEBIE
This commit is contained in:
Matthew Chen 2017-07-11 16:11:56 -04:00
parent 5cf0441f55
commit 669e0644ea
2 changed files with 8 additions and 13 deletions

View File

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

View File

@ -644,7 +644,7 @@
"IN_CALL_TERMINATED" = "Call Ended.";
/* 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 */
"INBOX_VIEW_MISSING_CONTACTS_PERMISSION" = "To see the names of your contacts, update your system settings to allow contact access.";