mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
18 lines
334 B
Swift
18 lines
334 B
Swift
|
|
class ImmichPlugin: NSObject {
|
||
|
|
var detached: Bool
|
||
|
|
|
||
|
|
override init() {
|
||
|
|
detached = false
|
||
|
|
super.init()
|
||
|
|
}
|
||
|
|
|
||
|
|
func detachFromEngine() {
|
||
|
|
self.detached = true
|
||
|
|
}
|
||
|
|
|
||
|
|
func completeWhenActive<T>(for completion: @escaping (T) -> Void, with value: T) {
|
||
|
|
guard !self.detached else { return }
|
||
|
|
completion(value)
|
||
|
|
}
|
||
|
|
}
|