|
|
@@ -54,7 +54,8 @@ extension KingfisherWrapper where Base: NSButton {
|
|
|
placeholder: KFCrossPlatformImage? = nil,
|
|
|
options: KingfisherOptionsInfo? = nil,
|
|
|
progressBlock: DownloadProgressBlock? = nil,
|
|
|
- completionHandler: (@Sendable (Result<RetrieveImageResult, KingfisherError>) -> Void)? = nil) -> DownloadTask?
|
|
|
+ completionHandler: (@MainActor @Sendable (Result<RetrieveImageResult, KingfisherError>) -> Void)? = nil
|
|
|
+ ) -> DownloadTask?
|
|
|
{
|
|
|
let options = KingfisherParsedOptionsInfo(KingfisherManager.shared.defaultOptions + (options ?? .empty))
|
|
|
return setImage(
|
|
|
@@ -87,7 +88,8 @@ extension KingfisherWrapper where Base: NSButton {
|
|
|
placeholder: KFCrossPlatformImage? = nil,
|
|
|
options: KingfisherOptionsInfo? = nil,
|
|
|
progressBlock: DownloadProgressBlock? = nil,
|
|
|
- completionHandler: (@Sendable (Result<RetrieveImageResult, KingfisherError>) -> Void)? = nil) -> DownloadTask?
|
|
|
+ completionHandler: (@MainActor @Sendable (Result<RetrieveImageResult, KingfisherError>) -> Void)? = nil
|
|
|
+ ) -> DownloadTask?
|
|
|
{
|
|
|
return setImage(
|
|
|
with: resource?.convertToSource(),
|
|
|
@@ -102,7 +104,8 @@ extension KingfisherWrapper where Base: NSButton {
|
|
|
placeholder: KFCrossPlatformImage? = nil,
|
|
|
parsedOptions: KingfisherParsedOptionsInfo,
|
|
|
progressBlock: DownloadProgressBlock? = nil,
|
|
|
- completionHandler: (@Sendable (Result<RetrieveImageResult, KingfisherError>) -> Void)? = nil) -> DownloadTask?
|
|
|
+ completionHandler: (@MainActor @Sendable (Result<RetrieveImageResult, KingfisherError>) -> Void)? = nil
|
|
|
+ ) -> DownloadTask?
|
|
|
{
|
|
|
var mutatingSelf = self
|
|
|
guard let source = source else {
|
|
|
@@ -185,7 +188,8 @@ extension KingfisherWrapper where Base: NSButton {
|
|
|
placeholder: KFCrossPlatformImage? = nil,
|
|
|
options: KingfisherOptionsInfo? = nil,
|
|
|
progressBlock: DownloadProgressBlock? = nil,
|
|
|
- completionHandler: (@Sendable (Result<RetrieveImageResult, KingfisherError>) -> Void)? = nil) -> DownloadTask?
|
|
|
+ completionHandler: (@MainActor @Sendable (Result<RetrieveImageResult, KingfisherError>) -> Void)? = nil
|
|
|
+ ) -> DownloadTask?
|
|
|
{
|
|
|
let options = KingfisherParsedOptionsInfo(KingfisherManager.shared.defaultOptions + (options ?? .empty))
|
|
|
return setAlternateImage(
|
|
|
@@ -218,7 +222,8 @@ extension KingfisherWrapper where Base: NSButton {
|
|
|
placeholder: KFCrossPlatformImage? = nil,
|
|
|
options: KingfisherOptionsInfo? = nil,
|
|
|
progressBlock: DownloadProgressBlock? = nil,
|
|
|
- completionHandler: (@Sendable (Result<RetrieveImageResult, KingfisherError>) -> Void)? = nil) -> DownloadTask?
|
|
|
+ completionHandler: (@MainActor @Sendable (Result<RetrieveImageResult, KingfisherError>) -> Void)? = nil
|
|
|
+ ) -> DownloadTask?
|
|
|
{
|
|
|
return setAlternateImage(
|
|
|
with: resource?.convertToSource(),
|
|
|
@@ -233,7 +238,8 @@ extension KingfisherWrapper where Base: NSButton {
|
|
|
placeholder: KFCrossPlatformImage? = nil,
|
|
|
parsedOptions: KingfisherParsedOptionsInfo,
|
|
|
progressBlock: DownloadProgressBlock? = nil,
|
|
|
- completionHandler: (@Sendable (Result<RetrieveImageResult, KingfisherError>) -> Void)? = nil) -> DownloadTask?
|
|
|
+ completionHandler: (@MainActor @Sendable (Result<RetrieveImageResult, KingfisherError>) -> Void)? = nil
|
|
|
+ ) -> DownloadTask?
|
|
|
{
|
|
|
var mutatingSelf = self
|
|
|
guard let source = source else {
|