Fix build

This commit is contained in:
Ilya Laktyushin
2019-11-25 15:17:29 +04:00
parent e7126a46d3
commit 1884c63bed
5 changed files with 9 additions and 10 deletions

View File

@@ -26,6 +26,9 @@ static_library(
"//submodules/SegmentedControlNode:SegmentedControlNode",
"//submodules/Geocoding:Geocoding",
"//submodules/ItemListVenueItem:ItemListVenueItem",
"//submodules/MergeLists:MergeLists",
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
"//submodules/SearchBarNode:SearchBarNode",
],
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",

View File

@@ -114,13 +114,14 @@ class LocationPinAnnotationView: MKAnnotationView {
super.init(annotation: annotation, reuseIdentifier: locationPinReuseIdentifier)
self.addSubnode(self.smallNode)
self.smallNode.addSubnode(self.smallIconNode)
self.addSubnode(self.dotNode)
self.addSubnode(self.shadowNode)
self.shadowNode.addSubnode(self.backgroundNode)
self.backgroundNode.addSubnode(self.iconNode)
self.addSubnode(self.dotNode)
self.addSubnode(self.smallNode)
self.smallNode.addSubnode(self.smallIconNode)
self.annotation = annotation
}

View File

@@ -256,7 +256,7 @@ final class LocationPickerControllerNode: ViewControllerTracingNode {
|> reduceLeft(value: nil) { current, updated, emit -> CLLocation? in
if let current = current {
if let updated = updated {
if updated.distance(from: current) > 250 {
if updated.distance(from: current) > 250 || (updated.horizontalAccuracy < 50.0 && updated.horizontalAccuracy < current.horizontalAccuracy) {
emit(updated)
return updated
} else {
@@ -266,7 +266,7 @@ final class LocationPickerControllerNode: ViewControllerTracingNode {
return current
}
} else {
if let updated = updated, updated.horizontalAccuracy > 0.0 && updated.horizontalAccuracy < 50.0 {
if let updated = updated, updated.horizontalAccuracy > 0.0 {
emit(updated)
return updated
} else {

View File

@@ -10,10 +10,7 @@ import TelegramPresentationData
import TelegramUIPreferences
import MergeLists
import AccountContext
import SearchUI
import ChatListSearchItemHeader
import ItemListVenueItem
import ContextUI
import ItemListUI
import MapKit
@@ -44,7 +41,6 @@ private struct LocationSearchEntry: Identifiable, Comparable {
}
func item(account: Account, presentationData: PresentationData, sendVenue: @escaping (TelegramMediaMap) -> Void) -> ListViewItem {
// let header = ChatListSearchItemHeader(type: .contacts, theme: self.theme, strings: self.strings, actionTitle: nil, action: nil)
let venue = self.venue
return ItemListVenueItem(presentationData: ItemListPresentationData(presentationData), account: account, venue: self.venue, sectionId: 0, style: .plain, action: {
sendVenue(venue)

View File

@@ -7,7 +7,6 @@ import TelegramCore
import SyncCore
import TelegramPresentationData
import SearchBarNode
import LocalizedPeerData
private let searchBarFont = Font.regular(17.0)