]> git.saurik.com Git - cydia.git/commitdiff
Use setSectionIndexMinimumDisplayRowCount:.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 6 Mar 2011 04:21:26 +0000 (20:21 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 7 Mar 2011 10:41:39 +0000 (02:41 -0800)
MobileCydia.mm

index 878cf45f8ab60d69422b06a98c4fe0a1de4092c3..6ca8f6941c63a40f6c993022bf2fce947b11140d 100644 (file)
@@ -6044,8 +6044,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (NSArray *) sectionIndexTitlesForTableView:(UITableView *)tableView {
 }
 
 - (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 {
 }
 
 - (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_];
 
         [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;
         [(UITableView *) list_ setDataSource:self];
         [list_ setDelegate:self];
     } return self;