mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-28 20:29:53 +00:00
fix animator crash
This commit is contained in:
parent
56922c6323
commit
c2c689ca91
1 changed files with 5 additions and 0 deletions
|
@ -62,6 +62,11 @@ struct SheetRepresentable<Content: View>: UIViewControllerRepresentable {
|
||||||
@available(*, unavailable)
|
@available(*, unavailable)
|
||||||
required init?(coder: NSCoder) { fatalError("init(coder:) missing") }
|
required init?(coder: NSCoder) { fatalError("init(coder:) missing") }
|
||||||
|
|
||||||
|
deinit {
|
||||||
|
animator.stopAnimation(true)
|
||||||
|
animator.finishAnimation(at: .current)
|
||||||
|
}
|
||||||
|
|
||||||
func animate(isPresented: Bool) {
|
func animate(isPresented: Bool) {
|
||||||
let alreadyAnimating = animator.isRunning && isPresented != animator.isReversed
|
let alreadyAnimating = animator.isRunning && isPresented != animator.isReversed
|
||||||
let sheetFullyDismissed = animator.fractionComplete == (animator.isReversed ? 1 : 0)
|
let sheetFullyDismissed = animator.fractionComplete == (animator.isReversed ? 1 : 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue