Skip to content

Commit

Permalink
Fix AnnotationToolbarViewController value change (#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvasilak authored Feb 8, 2024
1 parent b83d41c commit dd9cfcd
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ class AnnotationToolOptionsViewController: UIViewController {
}

func update(state: AnnotationToolOptionsState) {
valueChanged(state.colorHex, state.size)
if state.changes.contains(.color) {
presentingViewController?.dismiss(animated: true)
}
Expand All @@ -166,9 +167,4 @@ class AnnotationToolOptionsViewController: UIViewController {
preferredContentSize = CGSize(width: Self.width, height: size.height)
}
}

override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
valueChanged(viewModel.state.colorHex, viewModel.state.size)
}
}

0 comments on commit dd9cfcd

Please sign in to comment.