From 0b8e0f68d38df5fc5e8af23fbb31154430fade19 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Thu, 21 Sep 2023 22:36:08 +0800 Subject: [PATCH] Fix the SDDisplayLink on watchOS does not behave like other platform The first callback should be trigger in next runloop when calling `start`, not callback in sync --- SDWebImage/Private/SDDisplayLink.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDWebImage/Private/SDDisplayLink.m b/SDWebImage/Private/SDDisplayLink.m index 1d22611a..1985ab46 100644 --- a/SDWebImage/Private/SDDisplayLink.m +++ b/SDWebImage/Private/SDDisplayLink.m @@ -197,7 +197,7 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt self.displayLink.paused = NO; #else if (self.displayLink.isValid) { - [self.displayLink fire]; + // Do nothing } else { SDWeakProxy *weakProxy = [SDWeakProxy proxyWithTarget:self]; self.displayLink = [NSTimer timerWithTimeInterval:kSDDisplayLinkInterval target:weakProxy selector:@selector(displayLinkDidRefresh:) userInfo:nil repeats:YES];