@sbaiahmed1/react-native-blur 4.6.0 → 4.6.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -46,9 +46,17 @@ class BlurEffectView: UIVisualEffectView {
|
|
|
46
46
|
// Set intensity
|
|
47
47
|
animator?.fractionComplete = intensity
|
|
48
48
|
// Stop the animation at the current state
|
|
49
|
-
DispatchQueue.main.async { [weak self] in
|
|
50
|
-
self
|
|
51
|
-
|
|
49
|
+
DispatchQueue.main.async { [weak self, weak animator] in
|
|
50
|
+
guard let self = self, let currentAnimator = self.animator, currentAnimator === animator else { return }
|
|
51
|
+
currentAnimator.stopAnimation(true)
|
|
52
|
+
currentAnimator.finishAnimation(at: .current)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
override func didMoveToWindow() {
|
|
57
|
+
super.didMoveToWindow()
|
|
58
|
+
if window != nil {
|
|
59
|
+
setupBlur()
|
|
52
60
|
}
|
|
53
61
|
}
|
|
54
62
|
|