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