★ wanayoo — archive 1999 https://github.com/RocketChat/Rocket.Chat.iOS/pull/2598Nouvelle recherche | Portail wanayoo
Skip to content
This repository has been archived by the owner. It is now read-only.

[NEW] Share user location #2598

Open
wants to merge 2 commits into
base: develop
from

Conversation

@luismachado
Copy link
Contributor

@luismachado luismachado commented Mar 21, 2019

@RocketChat/ios

So, the feature I've talked about previously.

It mirrors Whatsapp functionality and includes:

  • View Controller to select and share a location (based or not on user's location)
  • Address fetching
  • Custom cell to show the shared location
  • View controller to see the shared location, with distance and time calculations as well options to open apple maps / google maps / waze.

Closes #2331

@CLAassistant
Copy link

@CLAassistant CLAassistant commented Mar 21, 2019 •

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

@CLAassistant CLAassistant commented Mar 21, 2019

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

// 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.

This comment has been minimized.

@houndci-bot

houndci-bot Mar 21, 2019

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]) {

This comment has been minimized.

@houndci-bot

houndci-bot Mar 21, 2019

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 ?? "")

This comment has been minimized.

@houndci-bot

houndci-bot Mar 21, 2019

Line Length Violation: Line should be 120 characters or less: currently 126 characters (line_length)

func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle {
return .none
}
}

This comment has been minimized.

@houndci-bot

houndci-bot Mar 21, 2019

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) {

This comment has been minimized.

@houndci-bot

houndci-bot Mar 21, 2019

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))

This comment has been minimized.

@houndci-bot

houndci-bot Mar 21, 2019

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))

This comment has been minimized.

@houndci-bot

houndci-bot Mar 21, 2019

Line Length Violation: Line should be 120 characters or less: currently 143 characters (line_length)


extension CLLocationCoordinate2D {

func getLocationName(callback: @escaping (_ address: Address) -> Void) {

This comment has been minimized.

@houndci-bot

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)

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)

This comment has been minimized.

@houndci-bot

houndci-bot Mar 21, 2019

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 }

This comment has been minimized.

@houndci-bot

houndci-bot Mar 21, 2019

Line Length Violation: Line should be 120 characters or less: currently 135 characters (line_length)

@rafaelks rafaelks changed the title Feature/share user location [NEW] Share user location Apr 1, 2019
@rafaelks rafaelks self-requested a review Apr 2, 2019
@rafaelks rafaelks self-assigned this Apr 2, 2019
@rafaelks rafaelks removed their assignment Aug 1, 2019
@lbblitz54
Copy link

@lbblitz54 lbblitz54 commented Sep 4, 2019

@luismachado so did this hit a dead end.
or did everyone just get busy on other things

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants
You can’t perform that action at this time.