This repository was archived by the owner on Nov 9, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 44
55NSArray *map;
66NSInteger count;
7+ BOOL enabled = YES ;
78
89- (NSInteger )tableView:(id )view numberOfRowsInSection:(NSInteger )section {
910 NSInteger result = %orig (view, section);
@@ -43,10 +44,18 @@ - (NSInteger)tableView:(id)view numberOfRowsInSection:(NSInteger)section {
4344}
4445
4546- (id )tableView:(id )view cellForRowAtIndexPath:(NSIndexPath *)indexPath {
46- if (indexPath.row < count && [[self specifier ].identifier isEqualToString: @" MOBILE_DATA_SETTINGS_ID" ] && indexPath.section == [self numberOfSectionsInTableView: view] - 2 )
47+ if (enabled && indexPath.row < count && [[self specifier ].identifier isEqualToString: @" MOBILE_DATA_SETTINGS_ID" ] && indexPath.section == [self numberOfSectionsInTableView: view] - 2 )
4748 return %orig (view, [NSIndexPath indexPathForRow: ((Entry *)map[indexPath.row]).index inSection: indexPath.section]);
4849 else
4950 return %orig (view, indexPath);
5051}
5152
53+ - (void )tableView:(id )view didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
54+ if ([[self specifier ].identifier isEqualToString: @" MOBILE_DATA_SETTINGS_ID" ] && indexPath.section == [self numberOfSectionsInTableView: view] - 3 ) {
55+ enabled = !enabled;
56+ [view reloadData ];
57+ }
58+ %orig;
59+ }
60+
5261%end
Original file line number Diff line number Diff line change 11Package: com.ccdog.cellularusageorder
22Name: CellularUsageOrder
33Depends: firmware (>= 7.0), mobilesubstrate
4- Version: 1.0
4+ Version: 1.1
55Architecture: iphoneos-arm
66Description: Order Cellular Data Usage by Size.
77Author: CC-Dog <
[email protected] >
You can’t perform that action at this time.
0 commit comments