From 2f3099f62026692b1a1549671d1ac6b13e0d571e Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Fri, 12 Jan 2024 11:53:38 -0500 Subject: [PATCH] Change Task typing --- Whisky/Views/Bottle/Pins/PinView.swift | 4 ++-- Whisky/Views/Programs/ProgramView.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Whisky/Views/Bottle/Pins/PinView.swift b/Whisky/Views/Bottle/Pins/PinView.swift index c3b97601..227f406a 100644 --- a/Whisky/Views/Bottle/Pins/PinView.swift +++ b/Whisky/Views/Bottle/Pins/PinView.swift @@ -85,8 +85,8 @@ struct PinView: View { .task { name = pin.name guard let peFile = program.peFile else { return } - let task = Task.detached { - guard let image = peFile.bestIcon() else { return nil } + let task = Task.detached { + guard let image = peFile.bestIcon() else { return nil as Image? } return Image(nsImage: image) } self.image = await task.value diff --git a/Whisky/Views/Programs/ProgramView.swift b/Whisky/Views/Programs/ProgramView.swift index f6be3601..2cc717dd 100644 --- a/Whisky/Views/Programs/ProgramView.swift +++ b/Whisky/Views/Programs/ProgramView.swift @@ -111,8 +111,8 @@ struct ProgramView: View { } .task { guard let peFile = program.peFile else { return } - let task = Task.detached { - guard let image = peFile.bestIcon() else { return nil } + let task = Task.detached { + guard let image = peFile.bestIcon() else { return nil as Image? } return Image(nsImage: image) } self.image = await task.value