widget interaction fixes

This commit is contained in:
True Zhuanjia
2026-08-25 23:20:24 +08:00
parent 0e8903d233
commit 2bfddf255a
3 changed files with 12 additions and 0 deletions
+4
View File
@@ -75,6 +75,7 @@ import ObjectiveC.runtime
func resetMagnifierStreamView(animated:Bool)
@objc(restoreMagnifierStreamViewWithOffset:scale:)
func restoreMagnifierStreamView(offset: CGPoint, scale: CGFloat)
func startStreamViewInteractionTimer()
}
@objc enum WidgetTypeEnum: UInt8 {
@@ -3630,6 +3631,7 @@ import ObjectiveC.runtime
}
@objc private func vl_autoDock_touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
self.functionalWidgetDelegate?.startStreamViewInteractionTimer()
guard autoDockEnabled else {
OnScreenWidgetView.autoDockOriginalTouchesBeganIMP?(self, #selector(OnScreenWidgetView.touchesBegan(_:with:)), touches, event)
return
@@ -3784,6 +3786,8 @@ import ObjectiveC.runtime
autoDockIdleDuration = storedAutoDockIdleDuration
self.functionalWidgetDelegate?.startStreamViewInteractionTimer()
if !folded {
restartAutoDockCountdown()
return
+2
View File
@@ -80,6 +80,8 @@
- (void)setAllowSingleTouchEnabled:(BOOL)enabled;
- (void)toggleTouchDisabled:(bool)disabled;
- (void)startInteractionTimer;
#if !TARGET_OS_TV
- (void) updateCursorLocation:(CGPoint)location isMouse:(BOOL)isMouse;
#endif
@@ -2044,6 +2044,7 @@ static __weak StreamFrameViewController *VLSharedStreamFrameViewController = nil
}
- (void)gamepadPresenceChanged {
if(PublicUtils.iOS26Available) return;
#if !TARGET_OS_TV
if (@available(iOS 11.0, *)) {
[self setNeedsUpdateOfHomeIndicatorAutoHidden];
@@ -2079,6 +2080,7 @@ static __weak StreamFrameViewController *VLSharedStreamFrameViewController = nil
// also discard our edges deferring system gestures unless
// we willingly give up home bar hiding preference.
_userIsInteracting = YES;
if(PublicUtils.iOS26Available) return;
#if !TARGET_OS_TV
if (@available(iOS 11.0, *)) {
[self setNeedsUpdateOfHomeIndicatorAutoHidden];
@@ -2089,6 +2091,7 @@ static __weak StreamFrameViewController *VLSharedStreamFrameViewController = nil
- (void)userInteractionEnded {
// Enable home bar hiding again if conditions allow
_userIsInteracting = NO;
if(PublicUtils.iOS26Available) return;
#if !TARGET_OS_TV
if (@available(iOS 11.0, *)) {
[self setNeedsUpdateOfHomeIndicatorAutoHidden];
@@ -2370,6 +2373,9 @@ static __weak StreamFrameViewController *VLSharedStreamFrameViewController = nil
});
}
- (void)startStreamViewInteractionTimer {
[_streamView startInteractionTimer];
}
- (void)dealloc {
if (VLSharedStreamFrameViewController == self) {