forked from gilshahar7/TapToOpen
		
	Initial release
This commit is contained in:
		
							
								
								
									
										12
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,12 @@
 | 
			
		||||
ARCHS = armv7 arm64
 | 
			
		||||
include $(THEOS)/makefiles/common.mk
 | 
			
		||||
 | 
			
		||||
TWEAK_NAME = TapToOpen
 | 
			
		||||
TapToOpen_FILES = Tweak.xm
 | 
			
		||||
TapToOpen_FRAMEWORKS = UIKit
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
include $(THEOS_MAKE_PATH)/tweak.mk
 | 
			
		||||
 | 
			
		||||
after-install::
 | 
			
		||||
	install.exec "killall -9 SpringBoard"
 | 
			
		||||
							
								
								
									
										1
									
								
								TapToOpen.plist
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								TapToOpen.plist
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
{ Filter = { Bundles = ( "com.apple.springboard" ); }; }
 | 
			
		||||
							
								
								
									
										50
									
								
								Tweak.xm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								Tweak.xm
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,50 @@
 | 
			
		||||
@interface NCNotificationShortLookViewController
 | 
			
		||||
-(id)_presentedLongLookViewController;
 | 
			
		||||
-(void)addGestureRecognizer:(id)arg1;
 | 
			
		||||
@property (assign, nonatomic) UIView *view;
 | 
			
		||||
@end
 | 
			
		||||
 | 
			
		||||
@interface NCNotificationListCell
 | 
			
		||||
-(void)_executeDefaultActionIfCompleted;
 | 
			
		||||
-(void)setExecutingDefaultAction:(BOOL)arg1;
 | 
			
		||||
-(void)setSupportsSwipeToDefaultAction:(BOOL)arg1 ;
 | 
			
		||||
-(BOOL)isActionButtonsFullyRevealed;
 | 
			
		||||
-(NCNotificationShortLookViewController *)contentViewController;
 | 
			
		||||
 | 
			
		||||
@end
 | 
			
		||||
 | 
			
		||||
@interface SBLockScreenManager
 | 
			
		||||
+(SBLockScreenManager *)sharedInstance;
 | 
			
		||||
-(BOOL)isUILocked;
 | 
			
		||||
@end
 | 
			
		||||
 | 
			
		||||
%hook NCNotificationListCell
 | 
			
		||||
CGFloat myThreshold = 0;
 | 
			
		||||
-(CGFloat)_defaultActionExecuteThreshold{return myThreshold;}
 | 
			
		||||
-(CGFloat)_defaultActionTriggerThreshold{return myThreshold;}
 | 
			
		||||
-(CGFloat)_defaultActionOvershootContentOffset{return 0;}
 | 
			
		||||
-(void)layoutSubviews{
 | 
			
		||||
	%orig;
 | 
			
		||||
	bool isLocked = [[%c(SBLockScreenManager) sharedInstance] isUILocked];
 | 
			
		||||
	if(isLocked == true){
 | 
			
		||||
		if(MSHookIvar<NSMutableArray *>([self contentViewController].view, "_gestureRecognizers") == nil)
 | 
			
		||||
		{
 | 
			
		||||
			UITapGestureRecognizer *singleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dood:)];
 | 
			
		||||
			[[self contentViewController].view addGestureRecognizer:singleFingerTap];
 | 
			
		||||
			[self setSupportsSwipeToDefaultAction:false];
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
%new
 | 
			
		||||
-(void)dood:(UITapGestureRecognizer *)recognizer{
 | 
			
		||||
	bool isLocked = [[%c(SBLockScreenManager) sharedInstance] isUILocked];
 | 
			
		||||
	if((isLocked == true) && ([self isActionButtonsFullyRevealed] == false) && ([[self contentViewController] _presentedLongLookViewController] == nil))
 | 
			
		||||
	{		
 | 
			
		||||
		myThreshold = -1;
 | 
			
		||||
		[self setSupportsSwipeToDefaultAction:true];
 | 
			
		||||
		[self _executeDefaultActionIfCompleted];
 | 
			
		||||
		[self setSupportsSwipeToDefaultAction:false];
 | 
			
		||||
		myThreshold = 0;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
%end
 | 
			
		||||
							
								
								
									
										9
									
								
								control
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								control
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,9 @@
 | 
			
		||||
Package: com.gilshahar7.taptoopen
 | 
			
		||||
Name: TapToOpen
 | 
			
		||||
Depends: mobilesubstrate
 | 
			
		||||
Version: 1.0
 | 
			
		||||
Architecture: iphoneos-arm
 | 
			
		||||
Description: Tap on lockscreen notifications to open them.
 | 
			
		||||
Maintainer: gilshahar7
 | 
			
		||||
Author: gilshahar7
 | 
			
		||||
Section: Tweaks
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								packages/com.gilshahar7.taptoopen_1.0_iphoneos-arm.deb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								packages/com.gilshahar7.taptoopen_1.0_iphoneos-arm.deb
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user