mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-25 13:31:22 +00:00
Merge pull request #113 from pawlowskialex/master
Dispatch LOTAnimationView completion to the main thread on macOS (fixes #103)
This commit is contained in:
@@ -557,6 +557,17 @@ const NSTimeInterval singleFrameTimeValue = 1.0 / 60.0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
- (void)setCompletionBlock:(LOTAnimationCompletionBlock)completionBlock {
|
||||
if (completionBlock) {
|
||||
_completionBlock = ^(BOOL finished) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{ completionBlock(finished); });
|
||||
};
|
||||
}
|
||||
else {
|
||||
_completionBlock = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setContentMode:(LOTViewContentMode)contentMode {
|
||||
_contentMode = contentMode;
|
||||
|
||||
Reference in New Issue
Block a user