-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTweak.xm
More file actions
53 lines (38 loc) · 1.31 KB
/
Tweak.xm
File metadata and controls
53 lines (38 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include"scanify.h"
%hook WFAirportViewController
static long long rowsInSection1;
-(long long)tableView:(id)arg1 numberOfRowsInSection:(long long)arg2 {
long long val = %orig;
if(arg2 == 1){
rowsInSection1 = val + 1;
return rowsInSection1;
}
return val;
}
-(id)tableView:(id)arg1 cellForRowAtIndexPath:(id)arg2 {
if(((NSIndexPath *)arg2).section == 1 && ((NSIndexPath *)arg2).row + 1 == rowsInSection1){
UITableViewCell* refreshCell = [((UITableView *)arg1) dequeueReusableCellWithIdentifier:@"WFOtherNetworkCell"];
refreshCell.textLabel.text = @"Scan...";
[refreshCell setPreservesSuperviewLayoutMargins:YES];
[[refreshCell contentView] setPreservesSuperviewLayoutMargins:YES];
refreshCell.layoutMargins = UIEdgeInsetsMake(0.0 , 40.0, 0.0, 0.0);
return refreshCell;
}
else return %orig;
}
-(void)tableView:(id)arg1 didSelectRowAtIndexPath:(id)arg2 {
if(((NSIndexPath *)arg2).section == 1 && ((NSIndexPath *)arg2).row + 1 == rowsInSection1){
WFNetworkListController *listDelegate = (WFNetworkListController *)[self listDelegate];
[listDelegate stopScanning];
[listDelegate startScanning];
[self.tableView deselectRowAtIndexPath:arg2 animated:YES];
}
else %orig;
}
%end
//For Removing RSSI Rssi Threshold Filter
%hook WFScanRequest
-(BOOL)applyRssiThresholdFilter{
return NO;
}
%end