Skip to content

Commit

Permalink
Interface modifications
Browse files Browse the repository at this point in the history
Restore footer indicators in cover sheet
Restore button to invoke Siri
  • Loading branch information
VitaTaf committed Jan 24, 2018
1 parent 23930e7 commit b0c7916
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
37 changes: 36 additions & 1 deletion Tweak.xm
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
long _dismissalSlidingMode = 0;
bool originalButton;
long _homeButtonType = 1;

// Enable home gestures
%hook BSPlatform
- (NSInteger)homeButtonType {
return 2;
_homeButtonType = %orig;
if (originalButton) {
originalButton = NO;
return %orig;
} else {
return 2;
}
}
%end

Expand Down Expand Up @@ -48,3 +56,30 @@ long _dismissalSlidingMode = 0;
return;
}
%end

// Hide home bar in cover sheet
%hook SBDashboardHomeAffordanceView
- (void)_createStaticHomeAffordance {
return;
}
%end

// Restore footer indicators
%hook SBDashBoardViewController
- (void)viewDidLoad {
originalButton = YES;
%orig;
}
%end

// Restore button to invoke Siri
%hook SBLockHardwareButtonActions
- (id)initWithHomeButtonType:(long long)arg1 proximitySensorManager:(id)arg2 {
return %orig(_homeButtonType, arg2);
}
%end
%hook SBHomeHardwareButtonActions
- (id)initWitHomeButtonType:(long long)arg1 {
return %orig(_homeButtonType);
}
%end
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: com.VitaTaf.HomeGesture
Name: HomeGesture
Depends: mobilesubstrate
Version: 0.0.1
Version: 1.1
Architecture: iphoneos-arm
Description: Enable iPhone X home gesture on other devices.
Maintainer: VitaTaf
Expand Down

0 comments on commit b0c7916

Please sign in to comment.