Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (id)tableView:(UITableView*)tableView objectAtIndexPath:(NSIndexPath*)indexPath
- {
- if (indexPath.section == TAPSearchDataSourceSectionTopTalkers) {
- if ((indexPath.row == [tableView numberOfRowsInSection:0] - 1) && self.shouldShowAutocompleteTalker && [self autocompletedTalker]) {
- return self.autocompletedTalker;
- } else if (!self.topTalkers.count || indexPath.row > self.topTalkers.count - 1) {
- return self.searchService.serverSearchResultsForTalkers[indexPath.row - self.topTalkers.count];
- }
- return self.topTalkers[indexPath.row];
- } else if (indexPath.section == TAPSearchDataSourceSectionTopConversations) {
- if (!self.topConversations.count || indexPath.row > self.topConversations.count - 1) {
- return self.searchService.serverSearchResultsForConversations[indexPath.row - self.topConversations.count]; <- crash here
- }
- return self.topConversations[indexPath.row];
- } else if (indexPath.section == TAPSearchDataSourceSectionMoreTalkers) {
- return self.moreTalkers[indexPath.row];
- } else if (indexPath.section == TAPSearchDataSourceSectionMoreConversations) {
- return self.moreConversations[indexPath.row];
- } else if (indexPath.section == TAPSearchDataSourceSectionServerResult) {
- if (self.searchService.serverSearchResultsForTalkers.count > 0) {
- return self.searchService.serverSearchResultsForTalkers[indexPath.row + self.numberOfServerTalkerToCompleteLocalTalkers];
- }
- return self.searchService.serverSearchResultsForConversations[indexPath.row + self.numberOfServerConversationToCompleteLocalConversations];
- }
- return nil;
- }
Add Comment
Please, Sign In to add comment