background info update tweak

This commit is contained in:
TrueZhuanjia
2025-07-25 11:51:18 +08:00
parent 2b0fb3844b
commit e51701ef00
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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 {
+2 -2
View File
@@ -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