From 1527b095dbeade949e8f00a836a315edd5a09baf Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 5 Mar 2011 20:21:26 -0800 Subject: Use setSectionIndexMinimumDisplayRowCount:. --- MobileCydia.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 878cf45..6ca8f69 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -6044,8 +6044,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (NSArray *) sectionIndexTitlesForTableView:(UITableView *)tableView { - // XXX: is 20 the most optimal number here? - return [packages_ count] > 20 ? index_ : nil; + return index_; } - (NSInteger) tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index { @@ -6081,6 +6080,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [list_ setRowHeight:73]; [[self view] addSubview:list_]; + // XXX: is 20 the most optimal number here? + [list_ setSectionIndexMinimumDisplayRowCount:20]; + [(UITableView *) list_ setDataSource:self]; [list_ setDelegate:self]; } return self; -- cgit v1.2.3