Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 98b90f5

Browse files
author
张国晔
committed
Fix for not showing Usage in iOS 6
1 parent 96f1fae commit 98b90f5

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Tweak.x

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@
99
%hook PSListController
1010

1111
- (NSInteger)tableView:(id)view numberOfRowsInSection:(NSInteger)section {
12-
if ([[self specifier].identifier isEqualToString:@"General"] && (section == 0))
13-
return 1;
12+
if ((section == 0) && [[self specifier].identifier isEqualToString:@"General"])
13+
return %orig(view, section) - 1;
1414
else
1515
return %orig(view, section);
1616
}
1717

18+
- (id)tableView:(id)view cellForRowAtIndexPath:(NSIndexPath *)indexPath {
19+
if ((indexPath.section == 0) && (indexPath.row > 0) && [[self specifier].identifier isEqualToString:@"General"])
20+
return %orig(view, [NSIndexPath indexPathForRow:indexPath.row + 1 inSection:indexPath.section]);
21+
else
22+
return %orig(view, indexPath);
23+
}
24+
1825
%end

control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: com.ccdog.hidesoftwareupdate
22
Name: HideSoftwareUpdate
33
Depends: firmware (>= 5.0), mobilesubstrate
4-
Version: 1.0
4+
Version: 1.1
55
Architecture: iphoneos-arm
66
Description: Hide Software Update in Preferences.app.
77
Author: CC-Dog <[email protected]>

0 commit comments

Comments
 (0)