mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-06-06 05:48:50 +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
|
#if !os(visionOS) && !DEBUG
|
||||||
import DesignSystem
|
import DesignSystem
|
||||||
import GiphyUISDK
|
@preconcurrency import GiphyUISDK
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
@MainActor
|
||||||
struct GifPickerView: UIViewControllerRepresentable {
|
struct GifPickerView: UIViewControllerRepresentable {
|
||||||
@Environment(Theme.self) private var theme
|
@Environment(Theme.self) private var theme
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@
|
||||||
GifPickerView.Coordinator(parent: self)
|
GifPickerView.Coordinator(parent: self)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MainActor
|
||||||
class Coordinator: NSObject, GiphyDelegate {
|
class Coordinator: NSObject, GiphyDelegate {
|
||||||
var parent: GifPickerView
|
var parent: GifPickerView
|
||||||
|
|
||||||
|
@ -40,13 +42,17 @@
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor func didDismiss(controller _: GiphyViewController?) {
|
nonisolated func didDismiss(controller _: GiphyViewController?) {
|
||||||
parent.onShouldDismissGifPicker()
|
Task { @MainActor in
|
||||||
|
parent.onShouldDismissGifPicker()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor func didSelectMedia(giphyViewController _: GiphyViewController, media: GPHMedia) {
|
nonisolated func didSelectMedia(giphyViewController _: GiphyViewController, media: GPHMedia) {
|
||||||
let url = media.url(rendition: .fixedWidth, fileType: .gif)
|
Task { @MainActor in
|
||||||
parent.completion(url ?? "")
|
let url = media.url(rendition: .fixedWidth, fileType: .gif)
|
||||||
|
parent.completion(url ?? "")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue