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