]> git.saurik.com Git - cydia.git/blobdiff - UICaboodle/ResetView.mm
Fix the custom button problem - applyRightButton was overriding BrowserView's support...
[cydia.git] / UICaboodle / ResetView.mm
index 8c0041a3bc2d739e680ebe99937c1f868751d1ef..ffdb0431d45f41efc79e7328ac84d8b520e64c0f 100644 (file)
@@ -3,6 +3,11 @@
 #include <objc/objc.h>
 #include <objc/runtime.h>
 
+#include <errno.h>
+
+#include <cstdio>
+#include <cstdlib>
+
 @implementation UIView (RVBook)
 
 - (void) resetViewAnimated:(BOOL)animated {
 
 @end
 
-@implementation UITable (RVBook)
-
-- (void) resetViewAnimated:(BOOL)animated {
-    [self selectRow:-1 byExtendingSelection:NO withFade:animated];
-}
-
-- (void) clearView {
-    [self clearAllData];
-}
-
-@end
-
-@implementation UISectionList (RVBook)
+@implementation UITableView (RVBook)
 
 - (void) resetViewAnimated:(BOOL)animated {
-    [[self table] resetViewAnimated:animated];
+    //[self selectRowAtIndexPath:nil animated:animated scrollPosition:UITableViewScrollPositionNone];
+    if (NSIndexPath *path = [self indexPathForSelectedRow])
+        [self deselectRowAtIndexPath:path animated:animated];
 }
 
 - (void) clearView {
-    [[self table] clearView];
+    //XXX:[[self table] clearView];
 }
 
 @end