mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-11 00:25:35 +00:00
More fix to Archive
This commit is contained in:
parent
57c2133673
commit
caac1334d1
1 changed files with 13 additions and 7 deletions
|
@ -1,9 +1,10 @@
|
|||
#if !os(visionOS) && !DEBUG
|
||||
import DesignSystem
|
||||
import GiphyUISDK
|
||||
@preconcurrency import GiphyUISDK
|
||||
import SwiftUI
|
||||
import UIKit
|
||||
|
||||
|
||||
@MainActor
|
||||
struct GifPickerView: UIViewControllerRepresentable {
|
||||
@Environment(Theme.self) private var theme
|
||||
|
||||
|
@ -33,6 +34,7 @@
|
|||
GifPickerView.Coordinator(parent: self)
|
||||
}
|
||||
|
||||
@MainActor
|
||||
class Coordinator: NSObject, GiphyDelegate {
|
||||
var parent: GifPickerView
|
||||
|
||||
|
@ -40,13 +42,17 @@
|
|||
self.parent = parent
|
||||
}
|
||||
|
||||
@MainActor func didDismiss(controller _: GiphyViewController?) {
|
||||
parent.onShouldDismissGifPicker()
|
||||
nonisolated func didDismiss(controller _: GiphyViewController?) {
|
||||
Task { @MainActor in
|
||||
parent.onShouldDismissGifPicker()
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor func didSelectMedia(giphyViewController _: GiphyViewController, media: GPHMedia) {
|
||||
let url = media.url(rendition: .fixedWidth, fileType: .gif)
|
||||
parent.completion(url ?? "")
|
||||
nonisolated func didSelectMedia(giphyViewController _: GiphyViewController, media: GPHMedia) {
|
||||
Task { @MainActor in
|
||||
let url = media.url(rendition: .fixedWidth, fileType: .gif)
|
||||
parent.completion(url ?? "")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue