|
|
|
|
|
|
|
|
@end |
|
|
@end |
|
|
|
|
|
|
|
|
%hook NCNotificationListCell |
|
|
%hook NCNotificationListCell |
|
|
CGFloat myThreshold = 0; |
|
|
|
|
|
-(CGFloat)_defaultActionExecuteThreshold{return myThreshold;} |
|
|
|
|
|
-(CGFloat)_defaultActionTriggerThreshold{return myThreshold;} |
|
|
|
|
|
|
|
|
bool changeThreshold = false; |
|
|
|
|
|
-(CGFloat)_defaultActionExecuteThreshold{ |
|
|
|
|
|
if(changeThreshold == false){ |
|
|
|
|
|
return %orig; |
|
|
|
|
|
}else{ |
|
|
|
|
|
return -1; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
-(CGFloat)_defaultActionTriggerThreshold{ |
|
|
|
|
|
if(changeThreshold){ |
|
|
|
|
|
return %orig; |
|
|
|
|
|
}else{ |
|
|
|
|
|
return -1; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
-(CGFloat)_defaultActionOvershootContentOffset{return 0;} |
|
|
-(CGFloat)_defaultActionOvershootContentOffset{return 0;} |
|
|
-(void)layoutSubviews{ |
|
|
-(void)layoutSubviews{ |
|
|
%orig; |
|
|
%orig; |
|
|
|
|
|
|
|
|
bool isLocked = [[%c(SBLockScreenManager) sharedInstance] isUILocked]; |
|
|
bool isLocked = [[%c(SBLockScreenManager) sharedInstance] isUILocked]; |
|
|
if((isLocked == true) && ([self isActionButtonsFullyRevealed] == false) && ([[self contentViewController] _presentedLongLookViewController] == nil)) |
|
|
if((isLocked == true) && ([self isActionButtonsFullyRevealed] == false) && ([[self contentViewController] _presentedLongLookViewController] == nil)) |
|
|
{ |
|
|
{ |
|
|
myThreshold = -1; |
|
|
|
|
|
|
|
|
changeThreshold = true; |
|
|
[self setSupportsSwipeToDefaultAction:true]; |
|
|
[self setSupportsSwipeToDefaultAction:true]; |
|
|
[self _executeDefaultActionIfCompleted]; |
|
|
[self _executeDefaultActionIfCompleted]; |
|
|
[self setSupportsSwipeToDefaultAction:false]; |
|
|
[self setSupportsSwipeToDefaultAction:false]; |
|
|
myThreshold = 0; |
|
|
|
|
|
|
|
|
changeThreshold = false; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
%end |
|
|
%end |