From e51701ef0016ebe4f5fa751fda4723ac08532c5b Mon Sep 17 00:00:00 2001 From: TrueZhuanjia Date: Fri, 25 Jul 2025 11:51:18 +0800 Subject: [PATCH] background info update tweak --- VoidLink/HostCardView.m | 4 ++-- VoidLink/UIAppView.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VoidLink/HostCardView.m b/VoidLink/HostCardView.m index 9081bb2b..ff4852e2 100644 --- a/VoidLink/HostCardView.m +++ b/VoidLink/HostCardView.m @@ -505,7 +505,7 @@ static const float REFRESH_CYCLE = 2.0f; - (void) updateLoop { // Stop immediately if the view has been detached - if (self.superview == nil) { + if (self.superview == nil || [self.delegate isStreaming]) { return; } @@ -514,7 +514,7 @@ static const float REFRESH_CYCLE = 2.0f; [self updateContentsForHost:_host]; // Queue the next refresh cycle - if(![self.delegate isStreaming]) [self performSelector:@selector(updateLoop) withObject:self afterDelay:REFRESH_CYCLE]; + [self performSelector:@selector(updateLoop) withObject:self afterDelay:REFRESH_CYCLE]; } - (void) updateContentsForHost:(TemporaryHost*)host { diff --git a/VoidLink/UIAppView.m b/VoidLink/UIAppView.m index b02538b8..54d9793b 100644 --- a/VoidLink/UIAppView.m +++ b/VoidLink/UIAppView.m @@ -260,7 +260,7 @@ static UIImage* noImage; - (void) updateLoop { // Stop immediately if the view has been detached - if (self.superview == nil) { + if (self.superview == nil || ![self.updateLoopDelegate isInAppView]) { return; } @@ -282,7 +282,7 @@ static UIImage* noImage; [self setAlpha:_app.hidden ? 0.4 : 1.0]; // Queue the next refresh cycle - if([self.updateLoopDelegate isInAppView]) [self performSelector:@selector(updateLoop) withObject:self afterDelay:REFRESH_CYCLE]; + [self performSelector:@selector(updateLoop) withObject:self afterDelay:REFRESH_CYCLE]; } @end