Various theming fixes

This commit is contained in:
Ilya Laktyushin
2019-12-16 10:33:16 +04:00
parent 26f89fedef
commit 62ae89d18b
29 changed files with 302 additions and 174 deletions

View File

@@ -120,7 +120,7 @@ final class LocationMapNode: ASDisplayNode, MKMapViewDelegate {
}
}
func setMapCenter(coordinate: CLLocationCoordinate2D, span: MKCoordinateSpan = defaultMapSpan, offset: CGPoint = CGPoint(), isUserLocation: Bool = false, animated: Bool = false) {
func setMapCenter(coordinate: CLLocationCoordinate2D, span: MKCoordinateSpan = defaultMapSpan, offset: CGPoint = CGPoint(), isUserLocation: Bool = false, hidePicker: Bool = false, animated: Bool = false) {
let region = MKCoordinateRegion(center: coordinate, span: span)
self.ignoreRegionChanges = true
if offset == CGPoint() {
@@ -136,7 +136,7 @@ final class LocationMapNode: ASDisplayNode, MKMapViewDelegate {
self.returnedToUserLocation = true
self.pickerAnnotationView?.setRaised(true, animated: true)
}
} else if self.hasPickerAnnotation, let customUserLocationAnnotationView = self.customUserLocationAnnotationView, customUserLocationAnnotationView.isHidden {
} else if self.hasPickerAnnotation, let customUserLocationAnnotationView = self.customUserLocationAnnotationView, customUserLocationAnnotationView.isHidden, hidePicker {
self.pickerAnnotationContainerView.isHidden = true
customUserLocationAnnotationView.setSelected(false, animated: false)
customUserLocationAnnotationView.isHidden = false