Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[NEW] Share user location #2598
Conversation
|
|
| // Set the region of the map that is rendered. | ||
| mapSnapshotOptions.region = region | ||
|
|
||
| // Set the scale of the image. We'll just use the scale of the current device, which is 2x scale on Retina screens. |
houndci-bot
Mar 21, 2019
Line Length Violation: Line should be 120 characters or less: currently 123 characters (line_length)
Line Length Violation: Line should be 120 characters or less: currently 123 characters (line_length)
| let coordinatesText = self.replacingOccurrences(of: "https://maps.google.com/?q=", with: "") | ||
|
|
||
| let splitCoordinates = coordinatesText.split(separator: ",") | ||
| if splitCoordinates.count == 2, let latitude = Double(splitCoordinates[0]), let longitude = Double(splitCoordinates[1]) { |
houndci-bot
Mar 21, 2019
Line Length Violation: Line should be 120 characters or less: currently 129 characters (line_length)
Line Length Violation: Line should be 120 characters or less: currently 129 characters (line_length)
| return | ||
| } | ||
|
|
||
| delegate?.openURLFromCell(url: locationChatItemItem.url, username: locationChatItemItem.message?.user?.username ?? "") |
houndci-bot
Mar 21, 2019
Line Length Violation: Line should be 120 characters or less: currently 126 characters (line_length)
Line Length Violation: Line should be 120 characters or less: currently 126 characters (line_length)
| func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle { | ||
| return .none | ||
| } | ||
| } |
houndci-bot
Mar 21, 2019
File Line Length Violation: File should contain 400 lines or less: currently contains 447 (file_length)
File Line Length Violation: File should contain 400 lines or less: currently contains 447 (file_length)
| } | ||
| } | ||
|
|
||
| func mapView(_ mapView: MKMapView, annotationView view: MKAnnotationView, calloutAccessoryControlTapped control: UIControl) { |
houndci-bot
Mar 21, 2019
Line Length Violation: Line should be 120 characters or less: currently 129 characters (line_length)
Line Length Violation: Line should be 120 characters or less: currently 129 characters (line_length)
| subtitleLabel.text = subtitle | ||
| subtitleLabel.sizeToFit() | ||
|
|
||
| let titleView = UIView(frame: CGRect(x: 0, y: 0, width: max(titleLabel.frame.size.width, subtitleLabel.frame.size.width), height: 30)) |
houndci-bot
Mar 21, 2019
Line Length Violation: Line should be 120 characters or less: currently 142 characters (line_length)
Line Length Violation: Line should be 120 characters or less: currently 142 characters (line_length)
| headerAddress = addressComponentsListWOCountry | ||
| } | ||
|
|
||
| callback(Address(shortAddress: shortAddress, placeName: placeName, completeAddress: completeAddress, headerAddress: headerAddress)) |
houndci-bot
Mar 21, 2019
Line Length Violation: Line should be 120 characters or less: currently 143 characters (line_length)
Line Length Violation: Line should be 120 characters or less: currently 143 characters (line_length)
|
|
||
| extension CLLocationCoordinate2D { | ||
|
|
||
| func getLocationName(callback: @escaping (_ address: Address) -> Void) { |
houndci-bot
Mar 21, 2019
Cyclomatic Complexity Violation: Function should have complexity 10 or less: currently complexity equals 16 (cyclomatic_complexity)
Function Body Length Violation: Function body should span 40 lines or less excluding comments and whitespace: currently spans 59 lines (function_body_length)
Cyclomatic Complexity Violation: Function should have complexity 10 or less: currently complexity equals 16 (cyclomatic_complexity)
Function Body Length Violation: Function body should span 40 lines or less excluding comments and whitespace: currently spans 59 lines (function_body_length)
| popover.popoverPresentationController?.delegate = self | ||
| popover.popoverPresentationController?.sourceView = view | ||
| popover.popoverPresentationController?.sourceRect = view.bounds | ||
| popover.popoverPresentationController?.backgroundColor = UIColor(red: 240/255, green: 240/255, blue: 240/255, alpha: 0.85) |
houndci-bot
Mar 21, 2019
Line Length Violation: Line should be 120 characters or less: currently 130 characters (line_length)
Line Length Violation: Line should be 120 characters or less: currently 130 characters (line_length)
| mapView.deselectAnnotation(view.annotation, animated: false) | ||
|
|
||
| let storyboard = UIStoryboard(name: "Location", bundle: nil) | ||
| guard let popover = storyboard.instantiateViewController(withIdentifier: "locationPopover") as? LocationPopover else { return } |
houndci-bot
Mar 21, 2019
Line Length Violation: Line should be 120 characters or less: currently 135 characters (line_length)
Line Length Violation: Line should be 120 characters or less: currently 135 characters (line_length)
|
@luismachado so did this hit a dead end. |
@RocketChat/ios
So, the feature I've talked about previously.
It mirrors Whatsapp functionality and includes:
Closes #2331