mirror of https://github.com/immich-app/immich.git
fix: ios skip posting hash response after detached from engine (#22695)
* skip posting message after detached from engine * review changes * cancel plugin before destroying engine --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Alex <alex.tran1502@gmail.com>pull/22917/head
parent
46869f664d
commit
cf52b879b1
@ -0,0 +1,17 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue