-
Notifications
You must be signed in to change notification settings - Fork 438
[NEW] Share user location #2598
base: develop
Are you sure you want to change the base?
[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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ?? "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line Length Violation: Line should be 120 characters or less: currently 126 characters (line_length)
func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle { | ||
return .none | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line Length Violation: Line should be 120 characters or less: currently 143 characters (line_length)
|
||
extension CLLocationCoordinate2D { | ||
|
||
func getLocationName(callback: @escaping (_ address: Address) -> Void) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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