From: Jay Freeman (saurik) Date: Sun, 6 Mar 2011 04:21:26 +0000 (-0800) Subject: Use setSectionIndexMinimumDisplayRowCount:. X-Git-Tag: v1.1.0%b1~49 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/1527b095dbeade949e8f00a836a315edd5a09baf Use setSectionIndexMinimumDisplayRowCount:. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 878cf45f..6ca8f694 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;