]> git.saurik.com Git - cydia.git/commitdiff
Fix the automatic scrolling - UIKit no longer likes 0-height rects :(. Only auto...
authorDustin L. Howett <dustin@howett.net>
Thu, 2 Dec 2010 12:23:34 +0000 (07:23 -0500)
committerDustin L. Howett <dustin@howett.net>
Thu, 2 Dec 2010 12:23:34 +0000 (07:23 -0500)
MobileCydia.mm

index 5c12b8b10d7c9fc2f88ba78320aa58ede3e22c34..196b9c02cc45123a9212a6a1f6cbbddfe8707c5b 100644 (file)
@@ -4674,8 +4674,11 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 - (void) _addProgressOutput:(NSString *)output {
     [output_ setText:[NSString stringWithFormat:@"%@\n%@", [output_ text], output]];
     CGSize size = [output_ contentSize];
-    CGRect rect = {{0, size.height}, {size.width, 0}};
-    [output_ scrollRectToVisible:rect animated:YES];
+    CGPoint offset = [output_ contentOffset];
+    if (size.height - offset.y < [output_ frame].size.height + 20.f) {
+        CGRect rect = {{0, size.height-1}, {size.width, 1}};
+        [output_ scrollRectToVisible:rect animated:YES];
+    }
 }
 
 - (BOOL) isRunning {