mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-07 23:46:02 +00:00
fix animator crash
This commit is contained in:
@@ -62,6 +62,11 @@ struct SheetRepresentable<Content: View>: UIViewControllerRepresentable {
|
||||
@available(*, unavailable)
|
||||
required init?(coder: NSCoder) { fatalError("init(coder:) missing") }
|
||||
|
||||
deinit {
|
||||
animator.stopAnimation(true)
|
||||
animator.finishAnimation(at: .current)
|
||||
}
|
||||
|
||||
func animate(isPresented: Bool) {
|
||||
let alreadyAnimating = animator.isRunning && isPresented != animator.isReversed
|
||||
let sheetFullyDismissed = animator.fractionComplete == (animator.isReversed ? 1 : 0)
|
||||
|
||||
Reference in New Issue
Block a user